[ 
https://issues.apache.org/jira/browse/JENA-1478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16352987#comment-16352987
 ] 

Andy Seaborne commented on JENA-1478:
-------------------------------------

I think the most important point design point is that transaction involvement 
is possible but not all combinations make sense.

DBOE is a bit better because its possible to define groups of components that 
comprise a transaction. That isn't the same as having one component in multiple 
groupings which is what is required for an ideal solution, as is true nested 
transactions.

There are several cases that are viable:
* The dyadic dataset is set up, and the transaction is done on the dyadic 
dataset, there being no transactions on the components.
* The dyadic dataset is setup inside transactions on both elements - in which 
case, a transaction on the dyadic dataset does not make sense.

Other case like the mixed case of one dataset in a transaction and one not, is 
not going to work automatically, the app is going to have to start a 
transaction on the non-active one. 

Only the first case - transaction on the dyadic dataset and component datasets 
not in a transaction for this thread - needs to be covered. The second case is 
outside the dyadic dataset.

If we say "no transactions on the components" while the dyadic has a 
transaction, then the dyadic dataset is a read transaction, which can be 
started as at preset calling {{begin(READ)}}. It does not even need to be 
synchronized.

I'm in the middle of adding {{promote(promoteType)}} so let me keep checking as 
I develop that code. Theer are minor thigns like commit throwing an exception 
but a read transaction can commit.


> DifferenceDatasetGraph.contains
> -------------------------------
>
>                 Key: JENA-1478
>                 URL: https://issues.apache.org/jira/browse/JENA-1478
>             Project: Apache Jena
>          Issue Type: Bug
>    Affects Versions: Jena 3.6.0
>            Reporter: Andy Seaborne
>            Priority: Major
>             Fix For: Jena 3.7.0
>
>
> (Assuming "difference is set-difference" not symmetric difference")
> defined "contains" as 
> {noformat}
> public boolean contains(Node g, Node s, Node p, Node o) {
>     return both(dsg -> dsg.contains(g, s, p, o));
> }
> {noformat}
> This should be:
> {noformat}
> public boolean contains(Node g, Node s, Node p, Node o) {
>     return getLeft().contains(g, s, p, o) && ! getRight().contains(g, s, p, 
> o);
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to