GitHub user afs opened a pull request:
https://github.com/apache/jena/pull/161
Plain begin
This PR is for discussion and is not yet ready for merging.
It adds to TDB the ability for a read transaction to promote to a write
transaction.
Currently (to avoid general API changes outside TDB) this happens
automatically in `DatasetGraphTransaction.getW()`.
It needs to be enabled with `DatasetGraphTransaction.promotion = true`
If this is useful, we can add new modes to `ReadWrite` and/or add `begin()`
(no args).
There is a big design point: at the point at which a transaction becomes a
writer their are two choices as to what to do if another write transaction
happened between this one starting and this one promoting.
1. The transaction can now see changes made by the other writer. A limited
form of "read committed" behaviour. Downside: results from actions during the
read phase may be invalidated.
1. The transaction is blocked from promoting. This is purer (results are
not invalidated; an error is returned) but the code must deal with it.
Having it as a choice is possible - one should be the default for `begin()`.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/afs/jena plain-begin
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/jena/pull/161.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 #161
----
commit 0bd93192b54c818852c033bcc644ccc6169e0abf
Author: Andy Seaborne <[email protected]>
Date: 2016-07-16T19:51:57Z
Split different categories of get() : R, W, G and T.
commit 1d6c6b91e5453e36ec423f1f54aed584dfac8f18
Author: Andy Seaborne <[email protected]>
Date: 2016-07-16T19:53:16Z
Typo
commit 5c507cc5bcd28a87c79550657e1e45301e02579e
Author: Andy Seaborne <[email protected]>
Date: 2016-07-16T19:53:50Z
Remove pointless private constructor.
commit 99d99e802c91d8e14afe4d66c189ae15c6b6fbdb
Author: Andy Seaborne <[email protected]>
Date: 2016-07-16T19:55:19Z
Typo
commit 8afea3b2972837ce6c7abb68512b7842fd2e0fc3
Author: Andy Seaborne <[email protected]>
Date: 2016-07-16T19:55:45Z
Make some methods package access.
commit 66425363776e9071497d70bd50e07be94bf3bb4c
Author: Andy Seaborne <[email protected]>
Date: 2016-07-16T19:58:00Z
Promotable TDB transactions.
commit d00f3b48b65c22dc5e010b7efa2ccd15801b81d1
Author: Andy Seaborne <[email protected]>
Date: 2016-07-17T09:38:24Z
Remove unused operations.
commit af12f3b7f042925f51fec7a0b5324af1d4a8ef09
Author: Andy Seaborne <[email protected]>
Date: 2016-07-17T13:34:25Z
Graphs across transaction boundaries.
commit 58002d91b999aa44e838d23e4e713f14e1006884
Author: Andy Seaborne <[email protected]>
Date: 2016-07-17T16:21:23Z
Do not cache default model. Assumes too much about the DatasetGraph.
commit 4c1847b02d7023bd39c76e35cbfaca9bdb191948
Author: Andy Seaborne <[email protected]>
Date: 2016-07-17T16:22:17Z
Refactor GraphTDB.
commit b08c60ce65ccfcf114b0cf21c3c96f0fee987b5f
Author: Andy Seaborne <[email protected]>
Date: 2016-07-18T15:24:58Z
Switchable promotion. Select txn/non-txn graph versions
----
---
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.
---