[
https://issues.apache.org/jira/browse/TINKERPOP-1727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16086035#comment-16086035
]
ASF GitHub Bot commented on TINKERPOP-1727:
-------------------------------------------
GitHub user twilmes opened a pull request:
https://github.com/apache/tinkerpop/pull/676
TINKERPOP-1727: Bytecode object shallow copied when traversals are cloned
Added an explicit deep copy of `bytecode` in `DefaultTraversal.clone()`
VOTE: +1
```
[INFO] Apache TinkerPop ................................... SUCCESS [
7.372 s]
[INFO] Apache TinkerPop :: Gremlin Shaded ................. SUCCESS [
3.981 s]
[INFO] Apache TinkerPop :: Gremlin Core ................... SUCCESS [01:56
min]
[INFO] Apache TinkerPop :: Gremlin Test ................... SUCCESS [
18.989 s]
[INFO] Apache TinkerPop :: Gremlin Groovy ................. SUCCESS [04:20
min]
[INFO] Apache TinkerPop :: Gremlin Groovy Test ............ SUCCESS [
10.580 s]
[INFO] Apache TinkerPop :: TinkerGraph Gremlin ............ SUCCESS [03:51
min]
[INFO] Apache TinkerPop :: Gremlin Benchmark .............. SUCCESS [
9.258 s]
[INFO] Apache TinkerPop :: Gremlin Driver ................. SUCCESS [
17.654 s]
[INFO] Apache TinkerPop :: Neo4j Gremlin .................. SUCCESS [
4.002 s]
[INFO] Apache TinkerPop :: Gremlin Server ................. SUCCESS [01:03
min]
[INFO] Apache TinkerPop :: Gremlin Python ................. SUCCESS [
11.328 s]
[INFO] Apache TinkerPop :: Hadoop Gremlin ................. SUCCESS [04:17
min]
[INFO] Apache TinkerPop :: Spark Gremlin .................. SUCCESS [01:45
min]
[INFO] Apache TinkerPop :: Giraph Gremlin ................. SUCCESS [
11.786 s]
[INFO] Apache TinkerPop :: Gremlin Console ................ SUCCESS [
30.369 s]
[INFO] Apache TinkerPop :: Gremlin Archetype .............. SUCCESS [
0.167 s]
[INFO] Apache TinkerPop :: Archetype - TinkerGraph ........ SUCCESS [
6.686 s]
[INFO] Apache TinkerPop :: Archetype - Server ............. SUCCESS [
13.698 s]
[INFO] Apache TinkerPop :: Archetype - DSL ................ SUCCESS [
7.444 s]
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-1727
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/676.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 #676
----
commit e59124e7e82352cca60a5dd8ef2ab7c9c75198ee
Author: Ted Wilmes <[email protected]>
Date: 2017-07-13T16:59:17Z
Deep copy bytecode when cloning traversals.
----
> Bytecode object shallow copied when traversals are cloned
> ---------------------------------------------------------
>
> Key: TINKERPOP-1727
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1727
> Project: TinkerPop
> Issue Type: Bug
> Components: process
> Affects Versions: 3.3.0, 3.2.5
> Reporter: Ted Wilmes
> Assignee: Ted Wilmes
>
> The {{bytecode}} member of traversal objects are only shallow copied when a
> traversal is cloned. This causes issues because any updates to the clone will
> be propagated to cloned traversal.
> {code}
> gremlin> g = TinkerGraph.open().traversal()
> ==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
> gremlin> traversal = g.V().out();null
> ==>null
> gremlin> clonedTraversal = traversal.asAdmin().clone();null
> ==>null
> gremlin> clonedTraversal.out().out();null
> ==>null
> gremlin> traversal.getBytecode()
> ==>[[], [V(), out(), out(), out()]]
> gremlin> clonedTraversal.getBytecode()
> ==>[[], [V(), out(), out(), out()]]
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)