[
https://issues.apache.org/jira/browse/JENA-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15054669#comment-15054669
]
ASF GitHub Bot commented on JENA-1085:
--------------------------------------
GitHub user afs opened a pull request:
https://github.com/apache/jena/pull/108
JENA-1085: Copmmon pattern for transaction lifecycle. Always call down to
index operations.
(Cleaned version of PR #107)
This 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.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/afs/jena txnmem
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/jena/pull/108.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #108
----
commit e5dc2f801e83682d4ab6c73f7a48da7b22aca43d
Author: Andy Seaborne <[email protected]>
Date: 2015-12-12T21:57:19Z
JENA-1078: Silence warnings.
commit 393d9714df62e9da4d999c5c87aaee7a83d41a59
Author: Andy Seaborne <[email protected]>
Date: 2015-12-12T22:03:54Z
JENA-1085: change commitLock to systemLock. Use fixed code pattern.
* Reorganise code to use the same pattern for operations
* Always call indexes with transaction lifecycle operations
* Rename commitLock as systemLock
* Use ReentrantLock, not ReentrantReadWriteLock
----
> Review transaction finishes for DatasetGraphInMemory
> ----------------------------------------------------
>
> Key: JENA-1085
> URL: https://issues.apache.org/jira/browse/JENA-1085
> Project: Apache Jena
> Issue Type: Task
> Components: ARQ
> Affects Versions: Jena 3.0.1
> Reporter: Andy Seaborne
> Assignee: Andy Seaborne
> Fix For: Jena 3.1.0
>
>
> This JIRA is for a review of the transaction finishing code.
> Some of the code works because of the nature of specific implementations.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)