[JBoss JIRA] Created: (ISPN-604) Re-design CacheStore transactions
by Mircea Markus (JIRA)
Re-design CacheStore transactions
----------------------------------
Key: ISPN-604
URL: https://jira.jboss.org/browse/ISPN-604
Project: Infinispan
Issue Type: Feature Request
Components: Loaders and Stores, Transactions
Affects Versions: 4.1.0.CR2, 4.0.0.Final
Reporter: Mircea Markus
Assignee: Mircea Markus
Fix For: 5.0.0.Final
Current(4.1.x) transaction implementation in CacheStores is brocken in several ways:
1st problem.
- AbstractCacheStore.prepare:
public void prepare(List<? extends Modification> mods, GlobalTransaction tx, boolean isOnePhase) throws CacheLoaderException {
if (isOnePhase) {
applyModifications(mods);
} else {
transactions.put(tx, mods);
}
}
If this is 1PC we apply the modifications in the prepare phase - we should do it in the commit phase (as JTA does it).
2nd problem.
This currently exhibits during commit/rollback with JdbcXyzCacheStore, but it is rather a more general cache store issue.
When using a TransactionManager, during TM.commit AbstractCacheStore.commit is being called internally which tries to apply all the modifications that happened during that transaction.
Within the scope of AbstractCacheStore.commit, JdbcStore obtains a connection from a DataSource and tries to write the modifications on that connection.
Now if the DataSource is managed (e.g. by an A.S.) on the DS.getConnection call the A.S. would try to enlist the connection with the ongoing transaction by calling Transaction.enlistResource(XAResource xaRes) [1]
This method fails with an IllegalStateException, because the transaction's status is preparing (see javax.transaction.Transaction.enlistResource).
Suggested fix:
- the modifications should be registered to the transaction as they happen(vs. during prepare/commit as it happens now)
- this requires API changes in CacheStore, e.g.
void store(InternalCacheEntry entry)
should become
void store(InternalCacheEntry entry, GlobalTransaction gtx)
(gtx would be null if this is not a transactional call).
[1] This behavior is specified by the JDBC 2.0 Standard Extension API, chapter 7 - distributed transaction
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] Created: (ISPN-557) support for same transaction touching multiple nodes (multiple VMs)
by Mircea Markus (JIRA)
support for same transaction touching multiple nodes (multiple VMs)
--------------------------------------------------------------------
Key: ISPN-557
URL: https://jira.jboss.org/browse/ISPN-557
Project: Infinispan
Issue Type: Feature Request
Components: Transactions
Reporter: Mircea Markus
Assignee: Manik Surtani
Fix For: 5.1.0.Final
E.g. if a distributed transaction managers touches two embedded Infinispan nodes within the same transaction.
Could be implemented using the Hot Rod client approach - but in an embedded fashion!
EmbeddedClient <-- implements logic above
Except comms are in-VM for local entries
And via RpcDispatcher for remote entries
RemoteClient extends EmbeddedClient
Adds proper HotRod layer for comms
Including failover, smart routing, etc.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] Created: (ISPN-78) Large object support
by Manik Surtani (JIRA)
Large object support
--------------------
Key: ISPN-78
URL: https://jira.jboss.org/jira/browse/ISPN-78
Project: Infinispan
Issue Type: Feature Request
Components: Core API
Reporter: Manik Surtani
Assignee: Manik Surtani
Fix For: 5.0.0.GA
if each VM is allocated a 2GB heap and you have a 100 nodes in a grid with 1 redundant copy for each key, you have a theoretical addressable heap of 100GB. But you are limited by (half) the heap of a single VM per entry, since entries are stored whole.
E.g., cache.put(k, my2GBObject) will fail since you need at least 2GB for the object + another 2GB for its serialized form.
This gets worse when you try cache.put(k, my10GBObject). This *should* be possible if we have a theoretical 100GB heap.
Potential solutions here are to fragment large objects, and store each fragment under separate keys. Another approach would be to directly stream objects to disk. etc. Needs thought and design, possibly a separate API to prevent 'pollution" of the more simplistic API. (JumboCache?)
Re: fragmenting, issues to overcome:
How many chunks to fragment into? Max size of each key could be configured, but how do we determine the size of an Object? VM instrumentation? Or perhaps the JumboCache only stores byte[]'s?
--
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
12 years, 3 months