Github user afs commented on the pull request:
https://github.com/apache/jena/pull/107#issuecomment-164159785
Revised pull request (entangled with changes at Apache).
The revision
* Puts the transaction finalization code inside the commit/abort code that
takes the system lock. This mean the lock is taken once at the finishing of a
transaction.
* Reorganises the code to a rigid pattern for operations.
* Renames `commitLock` as `systemLock`
* Uses `ReentrantLock`, not `ReentrantReadWriteLock` (only the write lock
was used; the implement of a `ReentrantReadWriteLock.WriteLock` and
`ReentrantLock` is much the same for our usage, just calls to the `sync`
object).
As well as code review, design review would be appreciated. Compared to
the original design, this makes `abort` take a lock and call `abort` on indexes
whereas previously it simply did nothing, knowing the index implementations
would cope. Because `abort` is a not a performance critical operation
(usually!), the symmetric and explicit calls to index operations makes things
clearer in my view.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---