afs commented on issue #2200: URL: https://github.com/apache/jena/issues/2200#issuecomment-1900196409
Interesting! This style of usage wasn't in the design space so, in a touch of caution, note that the current usage patterns may go deep inside the code. For example, there isn't a per-transaction state object passed to every operation, it's implicit via `ThreadLocal`s. This then influences any assumed code sequences. I see no problem providing for adding a other `TransactionalSystem` implementations. Such implementations will need to take responsibility for correct behaviour. Are you planning on using any of Jena's transaction system implementation or having a separate implementation? The usual `TransactionalSystem` is connected to the transaction coordinator](https://github.com/apache/jena/blob/main/jena-tdb2/src/main/java/org/apache/jena/tdb2/store/TDB2StorageBuilder.java#L93-L94). See also `TransactionalSystem.detach` / `TransactionalSystem.attach`. The `ReentrantReadWriteLock` in `TransactionCoordinator` control exclusive/non-exclusive mode. "read-write" is not in terms of transaction read-write; it means "non-exclusive" and "exclusive" and happen to map to words "read" and "write" for a lock provided by the JRE. The "non-exclusive" mode is normal mode (multiple reader and single writer (MR+SW)l transactions run non-exclusive. The "exclusive" mode is system wide exclusive access for special system operations across the whole transaction system - e.g.the parallel bulk loader locks out all transactions and directly manipulates the TDB2 datastructures. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
