Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Some clients (such as Phoenix) parallelizes commands to update a table. In such circumstances, all parallelized tasks would want to use the same transaction. Since TransactionContext is not thread safe, clients are forced to track the list of TransactionAwares outside of Tephra, but a cleaner approach would allow each parallel task to share the same TransactionContext. In that case, though, the TransactionContext would be required to be thread safe.
An alternative approach would be to allow a TransactionContext to be instantiated given an existing Transaction and provide a getter for the TransactionAwares on the TransactionContext (so that they could be combined by the parent task upon completion).