-
Bug
-
Resolution: Done
-
Major
-
13.0.0.Final
-
None
My ISPN-13327 changes, which make preload always use a 1PC transaction, have uncovered a problem with the transactional stores and 1PC transactions, which is causing failures in TableJdbcStoreFunctionalTest.testLoadEntrySet[SQLITE|H2, transactionalCache=true, transactionalStore=true]
When a 1PC PrepareCommand is executed, first TransactionalStoreInterceptor calls persistenceManager.prepareAllTxStores().
Then CacheWriterInterceptor calls persistenceManager.performBatch() to store the entries.
And there is no call to persistenceManager.prepareAllTxStores() to release the tx connection in TableJdbcStore.
I'm thinking we could either
- Skip the persistenceManager.prepareAllTxStores() call in TransactionalStoreInterceptor.visitPrepareCommand() if the prepare is 1PC and let CacheWriterInterceptor handle persistence
- Add a call to persistenceManager.commitAllTxStores() in TransactionalStoreInterceptor.visitPrepareCommand() if the prepare is 1PC and make persistenceManager.performBatch() skip transactional stores
We also need to add a test to cover transactional stores with 1PC transactions.