[jira] [Commented] (JENA-1478) DifferenceDatasetGraph.contains
[ https://issues.apache.org/jira/browse/JENA-1478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16360462#comment-16360462 ] ASF subversion and git services commented on JENA-1478: --- Commit e44ca811387b457b9bf1227ca87f07c6ac6fecf2 in jena's branch refs/heads/master from [~andy.seaborne] [ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=e44ca81 ] JENA-1478: Fix for contains(g,s,p,o) > 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 >Assignee: 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)
[jira] [Commented] (JENA-1478) DifferenceDatasetGraph.contains
[ https://issues.apache.org/jira/browse/JENA-1478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (JENA-1478) DifferenceDatasetGraph.contains
[ https://issues.apache.org/jira/browse/JENA-1478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16352615#comment-16352615 ] A. Soroka commented on JENA-1478: - 1. [~jaco0646] never confirmed whether my work on JENA-1391 was good for him, but I think you are right. Please do go ahead. I'll open a ticket for myself to write more tests for the subclasses of {{DyadicDatasetGraph}}. 2. I didn't come to a real understanding of transactional behavior for views, period, and certainly not specifically for {{DyadicDatasetGraph}}, but certainly, {{null}} returns there are not cool. The question was: if one side is in {{READ}}, because the client opened a transaction on the view, and the other side is not (perhaps blocked waiting to get a lock) what is the right value here? It's not {{READ}} because the view is _not_ in a transaction at all. I'm happy for whatever you think is more "ergonomic" for the user. Maybe throw a very specific exception? But that feels like a terrible response to a reasonable query by the user… > 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)
[jira] [Commented] (JENA-1478) DifferenceDatasetGraph.contains
[ https://issues.apache.org/jira/browse/JENA-1478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16352370#comment-16352370 ] Andy Seaborne commented on JENA-1478: - {{DyadicDatasetGraph.transactionMode()}} This can return null. Enums really shouldn't be null. >From the point of view of {{DyadicDatasetGraph}}, transactions are READ >because no changes are allowed. of course, the underlying dataset can be >changing but there isn't transaction support for this anyway. > 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)
[jira] [Commented] (JENA-1478) DifferenceDatasetGraph.contains
[ https://issues.apache.org/jira/browse/JENA-1478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16352367#comment-16352367 ] Andy Seaborne commented on JENA-1478: - Found during some on-going work on transactions. I can apply this change as part of that PR if the fix is agreed. > 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)