Skip to content

TINKERPOP-1867 union() can produce extra traversers #775

Merged
asfgit merged 2 commits intotp32from
TINKERPOP-1867
Jan 21, 2018
Merged

TINKERPOP-1867 union() can produce extra traversers #775
asfgit merged 2 commits intotp32from
TINKERPOP-1867

Conversation

@dkuppitz
Copy link
Contributor

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

Implemented reset() in ComputerAwareStep to reset the previousIterator, and reset the finalStep in DefaultTraversal.

This fixes the false behavior, mainly seen in reducing barrier steps.

$ docker/build.sh -t -i
...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Apache TinkerPop .................................. SUCCESS [1:45.623s]
[INFO] Apache TinkerPop :: Gremlin Shaded ................ SUCCESS [21.575s]
[INFO] Apache TinkerPop :: Gremlin Core .................. SUCCESS [57.690s]
[INFO] Apache TinkerPop :: Gremlin Test .................. SUCCESS [6.146s]
[INFO] Apache TinkerPop :: Gremlin Groovy ................ SUCCESS [3:03.207s]
[INFO] Apache TinkerPop :: Gremlin Groovy Test ........... SUCCESS [4.203s]
[INFO] Apache TinkerPop :: TinkerGraph Gremlin ........... SUCCESS [2:59.389s]
[INFO] Apache TinkerPop :: Gremlin Benchmark ............. SUCCESS [7.549s]
[INFO] Apache TinkerPop :: Gremlin Driver ................ SUCCESS [1:31.627s]
[INFO] Apache TinkerPop :: Neo4j Gremlin ................. SUCCESS [0.936s]
[INFO] Apache TinkerPop :: Gremlin Server ................ SUCCESS [15:29.995s]
[INFO] Apache TinkerPop :: Gremlin Python ................ SUCCESS [2:40.883s]
[INFO] Apache TinkerPop :: Gremlin.Net ................... SUCCESS [2.247s]
[INFO] Apache TinkerPop :: Gremlin.Net - Source .......... SUCCESS [44.422s]
[INFO] Apache TinkerPop :: Gremlin.Net - Tests ........... SUCCESS [44.304s]
[INFO] Apache TinkerPop :: Hadoop Gremlin ................ SUCCESS [6:30.134s]
[INFO] Apache TinkerPop :: Spark Gremlin ................. SUCCESS [15:04.061s]
[INFO] Apache TinkerPop :: Giraph Gremlin ................ SUCCESS [2:23:46.498s]
[INFO] Apache TinkerPop :: Gremlin Console ............... SUCCESS [4:00.598s]
[INFO] Apache TinkerPop :: Gremlin Archetype ............. SUCCESS [0.080s]
[INFO] Apache TinkerPop :: Archetype - TinkerGraph ....... SUCCESS [33.522s]
[INFO] Apache TinkerPop :: Archetype - Server ............ SUCCESS [15.100s]
[INFO] Apache TinkerPop :: Archetype - DSL ............... SUCCESS [3.588s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3:21:02.647s
[INFO] Finished at: Wed Jan 10 01:21:22 UTC 2018
[INFO] Final Memory: 173M/631M
[INFO] ------------------------------------------------------------------------

VOTE: +1

@spmallette
Copy link
Contributor

Nice job. Does this also fix TINKERPOP-1629?

@dkuppitz
Copy link
Contributor Author

I was hoping so, but no, it doesn't. At least not in tp32/. Maybe we're gonna be surprised once it's merged into master/.

@spmallette
Copy link
Contributor

that sorta seems worrisome - i was thinking those two were highly related.....

@dkuppitz
Copy link
Contributor Author

I've merged this branch into master/ (locally), but it didn't change anything (which is actually a good thing, as I don't like surprises after a merge :)). We still get the kinda unexpected empty list in OLTP and the whole bunch of empty lists in OLAP:

gremlin> g = TinkerFactory.createModern().traversal().withoutStrategies(StandardVerificationStrategy)
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
gremlin> g.V(1).repeat(aggregate("a").fold().store("x").unfold().both().where(without("a")).dedup()).cap("x").next()
==>[]
==>[v[1]]
==>[v[3],v[2],v[4]]
==>[v[6],v[5]]
gremlin> g = TinkerFactory.createModern().traversal().withComputer().withoutStrategies(StandardVerificationStrategy)
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], graphcomputer]
gremlin> g.V(1).repeat(aggregate("a").fold().store("x").unfold().both().where(without("a")).dedup()).cap("x").next()
==>[v[1]]
==>[]
==>[]
==>[]
==>[]
==>[]
==>[v[2],v[4],v[3]]
==>[v[5],v[6]]

The results are the same in tp32/ and master/, nothing's changed.

So, although the issue looks similar, it's probably a whole different thing that just happens to produce the same kind of unexpected result entries.

@spmallette
Copy link
Contributor

I was hoping I could come up with some other form of testing for this change, but I can't seem to think of anything...........

VOTE +1 (pending changelog entry)

@robertdale
Copy link
Member

VOTE +1

…erator` and reset the `finalStep` in `DefaultTraversal`.

This fixes TINKERPOP-1867, a falsy behavior, mainly seen in reducing barrier steps.
@asfgit asfgit merged commit dd83c78 into tp32 Jan 21, 2018
@asfgit asfgit deleted the TINKERPOP-1867 branch April 14, 2018 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants