[infinispan-issues] [JBoss JIRA] (ISPN-8090) Functional commands don't support Data convertions In Transactional Caches
Katia Aresti (JIRA)
issues at jboss.org
Fri Jul 21 17:04:00 EDT 2017
[ https://issues.jboss.org/browse/ISPN-8090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13438986#comment-13438986 ]
Katia Aresti commented on ISPN-8090:
------------------------------------
[~rvansa]There is an issue with the TxDistributionInterceptor that I don't know how to resolve for this case in the actual Infinispan Architecture. I might be missing something and this might be simple, but I don't see it.
In this class the method
{code:java}
protected <C extends FlagAffectedCommand & TopologyAffectedCommand> CompletableFuture<Void> remoteGet(InvocationContext ctx, C command, Object key, boolean isWrite) {
CompletableFuture<Void> cf = super.remoteGet(ctx, command, key, isWrite);
// If the remoteGet is executed on non-origin node, the mutations list already contains all modifications
// and we are just trying to execute all of them from EntryWrappingIntercepot$EntryWrappingVisitor
if (!ctx.isOriginLocal() || !ctx.isInTxScope()) {
return cf;
}
List<Mutation> mutationsOnKey = getMutationsOnKey((TxInvocationContext) ctx, key);
if (mutationsOnKey.isEmpty()) {
return cf;
}
return cf.thenRun(() -> {
entryFactory.wrapEntryForWriting(ctx, key, false, true);
MVCCEntry cacheEntry = (MVCCEntry) ctx.lookupEntry(key);
* EntryView.ReadWriteEntryView readWriteEntryView = EntryViews.readWrite(cacheEntry, cacheEncoders);*
for (Mutation mutation : mutationsOnKey) {
mutation.apply(readWriteEntryView);
cacheEntry.updatePreviousValue();
}
});
}{code}
For this to work today, the EntryViews need to be aware of encoding/decoding as the lambdas modify the cache entry. The problem in this method is, how can I retrieve the encoding classes ? They are today configured - as I see in the code, but I might be missing something- through advancedCache and not the cache configuration. So how retrieve the encoders from there ?
Appart from that, I find hard to understand why is this method using functional command specific code (Mutations seem related just to Functional Commands), I guess this is related to the complexity of Tx and Functional Commands changing the entry values inside the lambdas ?
I decided to open a new issue to handle TX + Encoding specifically here. I managed to make most of the tests work but there is a big issue on this matter and it deserves it's own ticket.
> Functional commands don't support Data convertions In Transactional Caches
> --------------------------------------------------------------------------
>
> Key: ISPN-8090
> URL: https://issues.jboss.org/browse/ISPN-8090
> Project: Infinispan
> Issue Type: Feature Request
> Reporter: Katia Aresti
> Assignee: Katia Aresti
>
> Functional Maps in Tx mode do not support encoding caches.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the infinispan-issues
mailing list