[GitHub] tinkerpop pull request #931: TINKERPOP-2029 ConcurrentModificationException ...

2018-09-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/tinkerpop/pull/931


---


[GitHub] tinkerpop pull request #931: TINKERPOP-2029 ConcurrentModificationException ...

2018-09-14 Thread dkuppitz
Github user dkuppitz commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/931#discussion_r217759875
  
--- Diff: docs/src/upgrade/release-3.4.x.asciidoc ---
@@ -29,6 +29,29 @@ Please see the 
link:https://github.com/apache/tinkerpop/blob/3.4.0/CHANGELOG.asc
 
 === Upgrading for Users
 
+ Changed infix behavior
+
+The infix notation of `and()` and `or()` now supports an arbitrary number 
of traversals and `ConnectiveStrategy` produces a traversal with the correct 
AND and OR semantics. Furthermore,
+previous versions failed to apply 3 or more `and()` steps in an infix 
notation, this is now fixed.
+
+[source,groovy]
+
+gremlin> g.V().has("name","marko").and().has("age", 
lt(30)).or().has("name","josh").and().has("age", gt(30)).and().out("created")
+==>v[1]
+==>v[4]
+
+
+In previous versions the above traversal 
--- End diff --

Ugh, I was going to remove this piece as I mentioned previous versions in 
the comments above.


---


[GitHub] tinkerpop pull request #931: TINKERPOP-2029 ConcurrentModificationException ...

2018-09-14 Thread robertdale
Github user robertdale commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/931#discussion_r217720970
  
--- Diff: docs/src/upgrade/release-3.4.x.asciidoc ---
@@ -29,6 +29,29 @@ Please see the 
link:https://github.com/apache/tinkerpop/blob/3.4.0/CHANGELOG.asc
 
 === Upgrading for Users
 
+ Changed infix behavior
+
+The infix notation of `and()` and `or()` now supports an arbitrary number 
of traversals and `ConnectiveStrategy` produces a traversal with the correct 
AND and OR semantics. Furthermore,
+previous versions failed to apply 3 or more `and()` steps in an infix 
notation, this is now fixed.
+
+[source,groovy]
+
+gremlin> g.V().has("name","marko").and().has("age", 
lt(30)).or().has("name","josh").and().has("age", gt(30)).and().out("created")
+==>v[1]
+==>v[4]
+
+
+In previous versions the above traversal 
--- End diff --

Seems like something more is needed here.


---


[GitHub] tinkerpop pull request #931: TINKERPOP-2029 ConcurrentModificationException ...

2018-09-14 Thread robertdale
Github user robertdale commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/931#discussion_r217732616
  
--- Diff: docs/src/upgrade/release-3.4.x.asciidoc ---
@@ -29,6 +29,29 @@ Please see the 
link:https://github.com/apache/tinkerpop/blob/3.4.0/CHANGELOG.asc
 
 === Upgrading for Users
 
+ Changed infix behavior
+
+The infix notation of `and()` and `or()` now supports an arbitrary number 
of traversals and `ConnectiveStrategy` produces a traversal with the correct 
AND and OR semantics. Furthermore,
+previous versions failed to apply 3 or more `and()` steps in an infix 
notation, this is now fixed.
+
+[source,groovy]
+
+gremlin> g.V().has("name","marko").and().has("age", 
lt(30)).or().has("name","josh").and().has("age", gt(30)).and().out("created")
+==>v[1]
+==>v[4]
+
+
+In previous versions the above traversal 
+[source,groovy]
+
+gremlin> 
g.V().repeat(__.in('traverses').repeat(__.in('develops')).emit()).emit().values('name')
+==>stephen
+==>matthias
+==>marko
+
+
+See: 
link:https://issues.apache.org/jira/browse/TINKERPOP-967[TINKERPOP-967]
--- End diff --

There should be a link to this issue as well - 
https://issues.apache.org/jira/browse/TINKERPOP-2029


---


[GitHub] tinkerpop pull request #931: TINKERPOP-2029 ConcurrentModificationException ...

2018-09-14 Thread robertdale
Github user robertdale commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/931#discussion_r217731843
  
--- Diff: docs/src/upgrade/release-3.4.x.asciidoc ---
@@ -29,6 +29,29 @@ Please see the 
link:https://github.com/apache/tinkerpop/blob/3.4.0/CHANGELOG.asc
 
 === Upgrading for Users
 
+ Changed infix behavior
+
+The infix notation of `and()` and `or()` now supports an arbitrary number 
of traversals and `ConnectiveStrategy` produces a traversal with the correct 
AND and OR semantics. Furthermore,
+previous versions failed to apply 3 or more `and()` steps in an infix 
notation, this is now fixed.
+
--- End diff --

The graph example is good for those familiar with the graph but it's not 
immediately clear what the difference in behavior is. I really like the example 
from the comments. I think it would be good to add here (not necessarily 
verbatim) for clarity. 
```
# BEHAVIOR

Input: a.or.b.and.c.or.d.and.e.or.f.and.g.and.h.or.i

## BEFORE
Output: or(a, or(and(b, c), or(and(d, e), or(and(and(f, g), h), i

## NOW
Output: or(a, and(b, c), and(d, e), and(f, g, h), i)
```



---


[GitHub] tinkerpop pull request #931: TINKERPOP-2029 ConcurrentModificationException ...

2018-09-11 Thread dkuppitz
GitHub user dkuppitz opened a pull request:

https://github.com/apache/tinkerpop/pull/931

TINKERPOP-2029 ConcurrentModificationException for InlineFilterStrategy

https://issues.apache.org/jira/browse/TINKERPOP-2029

To fix the original issue, I basically rewrote `ConnectiveStrategy`. The 
infix notation of `and()` and `or()` now supports an arbitrary number of 
traversals and `ConnectiveStrategy` produces a traversal with correct `AND` and 
`OR` semantics.

The reason for targeting `master/` is that there were no strict semantics 
before and thus this needs to be considered a breaking change.

```
# BEHAVIOR

Input: a.or.b.and.c.or.d.and.e.or.f.and.g.and.h.or.i

## BEFORE
Output: or(a, or(and(b, c), or(and(d, e), or(and(and(f, g), h), i

## NOW
Output: or(a, and(b, c), and(d, e), and(f, g, h), i)
```

`docker/build.sh -t -i -n` passed.

VOTE +1

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apache/tinkerpop TINKERPOP-2029-master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/tinkerpop/pull/931.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 #931


commit 46ee42686a875baf123176040b2f341218e02e1a
Author: Stephen Mallette 
Date:   2018-09-05T17:08:01Z

TINKERPOP-2029 Added tests demonstrating strategy failures

Identified potentially two problems, one with ConnectedStrategy and by 
virtue of its application InlineFilterStrategy.

commit e518c9af9a4aca56449af2b743f24d35a8a43b50
Author: Daniel Kuppitz 
Date:   2018-09-10T18:41:34Z

Rewrote `ConnectiveStrategy`. It's a breaking change as it now behaves 
slightly differently, but now it

* produces correct AND and OR semantics.
* has fewer recursive calls (at most 1).
* is faster in its own execution and produces fewer steps in the final 
traversal which should make the processed traversal faster as well.

commit 2ce9a6def3426b2a2ff89e6b556ae8b2653f6098
Author: Daniel Kuppitz 
Date:   2018-09-10T18:47:46Z

Merge branch 'TINKERPOP-2029' into TINKERPOP-2029-master

commit 9330fcbc477e6a64649b6c6aa22f697756d31140
Author: Daniel Kuppitz 
Date:   2018-09-10T18:49:52Z

Removed note about infix restriction for `and()` and `or()` as they are no 
longer existent.

commit 40b21bbd1361712c7b3cef140773ea87da30dbd0
Author: Daniel Kuppitz 
Date:   2018-09-10T19:21:17Z

updated docs




---