JENA-1656: Make DatasetGraphMonitor transaction-aware.#519
JENA-1656: Make DatasetGraphMonitor transaction-aware.#519pipcet wants to merge 1 commit intoapache:masterfrom
Conversation
|
I agree - Because Jena has regular(ish) releases, development sometimes needs to mature in the system using it. There is an alternative interface Maybe |
|
There are a few places in the tree that use One problem I see with My current code also uses a new interface that monitors reads rather than writes, to determine which part of a graph has been looked at by a query (so we know when to repeat it to simulate a continuous query). So there are probably three use cases:
I think combining the first two in |
|
The important difference is in the visibility, whether the code can see the transaction as it happens (it is "inside" the transaction) or react to changes when they become generally visible ("outside" the transaction). If "inside" the code has to be careful (!) and same-thread.
For 1 is "outside"; 2 is "inside". 3 is "inside" if you mean a real time "being looked at" but maybe is actually "start request, end request" at some higher level. The only way to veto a transaction is from the inside and before commit. If "inside", same thread, the code can throw an exception any time up to commit and the transaction will abort (if used properly: We could add before and after for What about having a There is The only uses I found where, aside from tests, in jena-text and jena-spatial (and jena-spatial is likely to be retired). Getting Lucene to coordinate a commit with the triple store needs to happen; Lucene commits first. |
|
Ping @ajs6f who has an interest in relating sub-sections of the graph to actions; in his case, locking. Default method are fine; they are being used in various places. |
|
I think it would indeed be best to have both handlers for the "inside" and "outside" case; as you said, your application needs the inside case; mine needs the outside case (or a custom DatasetWrapper). I don't think the distinction is particularly useful for read transactions, though: those will probably have to deal with false positives anyway. |
|
I'm not sure what you mean by a "false positive" here. |
|
Sorry this has gone on for so long. I went back to this and investigated the relationship to jena-text. It's hard to untangle because jena-text is involved in the transaction and coordinates with Lucene. The contract for I've raised JENA-2071 to deprecate If this is still relevant, or you have further thoughts, please add to the ticket JENA-1656. |
This adds transaction information to the DatasetChanges interface (and uses default methods, is that okay?)