[JBoss JIRA] Created: (ISPN-86) InternalCacheValue/InternalCacheEntry optimization
by Mircea Markus (JIRA)
InternalCacheValue/InternalCacheEntry optimization
--------------------------------------------------
Key: ISPN-86
URL: https://jira.jboss.org/jira/browse/ISPN-86
Project: Infinispan
Issue Type: Feature Request
Components: Core API
Affects Versions: 4.0.0.BETA1
Reporter: Mircea Markus
Assignee: Mircea Markus
>From a IRC discussion with Manik:
Right now an InternalCacheValue(ICV) is created from an InternalCacheEntry(ICE) by the CacheStore whenever we persist an entry: this is in order to avoid duplicate marshalling of the key.
Same way, an InternalCacheEntry is created from an ICV whenever the value is unmarshalled.
Avoid this unnecessary creation of objects by making ICE aggregate an ICV, and delegate all the state calls to it.
Impl note: in order to allow delegation from ICE to ICV, make all the ICV's methods final.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 6 months
[JBoss JIRA] Resolved: (ISPN-68) ClusterGet - fix
by Mircea Markus (JIRA)
[ https://jira.jboss.org/jira/browse/ISPN-68?page=com.atlassian.jira.plugin... ]
Mircea Markus resolved ISPN-68.
-------------------------------
Resolution: Done
done
> ClusterGet - fix
> ----------------
>
> Key: ISPN-68
> URL: https://jira.jboss.org/jira/browse/ISPN-68
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 4.0.0.ALPHA2
> Reporter: Mircea Markus
> Assignee: Mircea Markus
> Fix For: 4.0.0.BETA1
>
>
> From an email sent by Manik on infinispan-dev:
> ==================================================
> Regarding direct loading from a cache loader in the ClusteredGetCommand, this is an issue since a) it does not acquire any locks to put this value back in the data container, and b) probably as a consequence of a), doesn't bother to put any looked up value in the data container at all.
> This is inefficient since multiple CGCs on the same key (coming from different cache instances in a cluster) would cause the owning cache to load this several times repeatedly from a loader.
> I see this problem with DIST since I use CGC to load an entry from a remote cache and if L1 caching is disabled on the requesting cache, multiple uses of an entry will result in this entry being read off a loader repeatedly. Which is no good. :-)
> So I think the CGC's perform() method should actually be doing a cache.get() - or something very similar - where the entire interceptor chain is invoked and locks are acquired, entries moved to the data container if loaded, etc., and metrics on cache hits/misses properly updated. The challenges here are, of course:
> 1. The ping-pong effect. So we need to make sure any clustered cache loader or the DistributionInterceptor do not try and load this from elsewhere in the cluster. Easily solved with the isOriginLocal flag on the context.
> 2. Making sure we get an InternalCacheEntry and not just a value to return. This is trickier since ICEs are not exposed via public APIs at all. Perhaps we need a separate, non-replicable Command for this purpose - maybe a subclass of GetKeyValueCommand (GetCacheEntryCommand?) which (a) cannot be replicated and (b) will return the ICE.
> So, CGC would create a GCEC and pass it up the interceptor chain, and retrieve the ICE from the GCEC after the call returns?
> =============================================
> This JIRA is about implementing 2nd suggestion as per description.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 6 months
[JBoss JIRA] Assigned: (ISPN-61) Tx optimisations
by Manik Surtani (JIRA)
[ https://jira.jboss.org/jira/browse/ISPN-61?page=com.atlassian.jira.plugin... ]
Manik Surtani reassigned ISPN-61:
---------------------------------
Assignee: Mircea Markus (was: Manik Surtani)
> Tx optimisations
> ----------------
>
> Key: ISPN-61
> URL: https://jira.jboss.org/jira/browse/ISPN-61
> Project: Infinispan
> Issue Type: Feature Request
> Affects Versions: 4.0.0.ALPHA4
> Reporter: Mircea Markus
> Assignee: Mircea Markus
> Fix For: 4.0.0.BETA1, 4.0.0.GA
>
>
> Following 2 optimizations might be implemented with respect to transactions.
> 1) From an email on infinispan-dev (horizon-dev actually):
> if there are only two members int the cluster always use an 1PC. If the 1st phase fails remotely, then also rollback locally. This would reduce one network roundtrip.
> While this is an interesting thought, it does raise the potential for race conditions - since this decision will have to be taken in the TxInterceptor in the beforeCompletion phase of a transaction, and by the time the call gets to the interceptor for replication, the topology may have changed such that you need to replicate to 2 instead of 1 other peer. Which would mean a 2PC again. So it does need some thought.
> 2) when asked to prepare, a participant might return a value indicating that no changes were made (read-only participant), so this one won't need an commit message, so less roundtrip.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 6 months
[JBoss JIRA] Updated: (ISPN-61) Tx optimisations
by Manik Surtani (JIRA)
[ https://jira.jboss.org/jira/browse/ISPN-61?page=com.atlassian.jira.plugin... ]
Manik Surtani updated ISPN-61:
------------------------------
Fix Version/s: 4.0.0.BETA1
4.0.0.GA
Affects Version/s: 4.0.0.ALPHA4
> Tx optimisations
> ----------------
>
> Key: ISPN-61
> URL: https://jira.jboss.org/jira/browse/ISPN-61
> Project: Infinispan
> Issue Type: Feature Request
> Affects Versions: 4.0.0.ALPHA4
> Reporter: Mircea Markus
> Assignee: Manik Surtani
> Fix For: 4.0.0.BETA1, 4.0.0.GA
>
>
> Following 2 optimizations might be implemented with respect to transactions.
> 1) From an email on infinispan-dev (horizon-dev actually):
> if there are only two members int the cluster always use an 1PC. If the 1st phase fails remotely, then also rollback locally. This would reduce one network roundtrip.
> While this is an interesting thought, it does raise the potential for race conditions - since this decision will have to be taken in the TxInterceptor in the beforeCompletion phase of a transaction, and by the time the call gets to the interceptor for replication, the topology may have changed such that you need to replicate to 2 instead of 1 other peer. Which would mean a 2PC again. So it does need some thought.
> 2) when asked to prepare, a participant might return a value indicating that no changes were made (read-only participant), so this one won't need an commit message, so less roundtrip.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 6 months