[jira] [Commented] (TINKERPOP-3110) Incorrect Bytecode when multiple options are used in traversal

2024-09-04 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3110:
---

saikiranboga commented on PR #2757:
URL: https://github.com/apache/tinkerpop/pull/2757#issuecomment-2330654145

   > Is there a test for the problem stated in TINKERPOP-3110? A test that 
asserts that if multiple with() are used that it is combined into a single 
OptionsStrategy that contains all the options from all the with()s?
   
   Yes. See `BytecodeHelperTest#shouldFindStrategy`.




> Incorrect Bytecode when multiple options are used in traversal
> --
>
> Key: TINKERPOP-3110
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3110
> Project: TinkerPop
>  Issue Type: Bug
>  Components: server
>Reporter: Saikiran Boga
>Priority: Major
>
> When multiple options like with("x",1).with("y",1) are used to build a 
> traversal, the Bytecode building logic when constructing the traversal on the 
> server keeps appending the Bytecode incrementally instead of replacing the 
> previous Bytecode instruction.
> For a query like below:
> {code:java}
> g
> .with('evaluationTimeout',30L)
> .with('a', 1)
> .with('b', 2)
> .with('c', 3)
> .V(){code}
> The Bytecode attached to traversal looks as:
> {code:java}
> g
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2, c: (int) 3))
> .V() {code}
> Instead it should be just single instruction for OptionsStrategy as:
>  
> {code:java}
> g
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2, c: (int) 3))
> .V() {code}
>  
> We always build a new OptionsStrategy here and carry over the previous 
> options 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalSource.java#L116-L122]
> as OptionsStrategy itself is immutable and we cannot add new options after 
> creating it.
>  
> We build the traversal strategies set and bytecode here:
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalSource.java#L132-L133]
>  
> The traversal strategies set itself is built correctly and we remove 
> duplicates 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversalStrategies.java#L42-L50]
>  
> But Bytecode just appends the new strategy as instruction 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Bytecode.java#L82-L83]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3110) Incorrect Bytecode when multiple options are used in traversal

2024-09-04 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3110:
---

xiazcy commented on PR #2757:
URL: https://github.com/apache/tinkerpop/pull/2757#issuecomment-2330605059

   Thanks @saikiranboga for the changes! Note you may need to resolve some 
CHANGELOG conflicts. 
   
   VOTE +1




> Incorrect Bytecode when multiple options are used in traversal
> --
>
> Key: TINKERPOP-3110
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3110
> Project: TinkerPop
>  Issue Type: Bug
>  Components: server
>Reporter: Saikiran Boga
>Priority: Major
>
> When multiple options like with("x",1).with("y",1) are used to build a 
> traversal, the Bytecode building logic when constructing the traversal on the 
> server keeps appending the Bytecode incrementally instead of replacing the 
> previous Bytecode instruction.
> For a query like below:
> {code:java}
> g
> .with('evaluationTimeout',30L)
> .with('a', 1)
> .with('b', 2)
> .with('c', 3)
> .V(){code}
> The Bytecode attached to traversal looks as:
> {code:java}
> g
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2, c: (int) 3))
> .V() {code}
> Instead it should be just single instruction for OptionsStrategy as:
>  
> {code:java}
> g
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2, c: (int) 3))
> .V() {code}
>  
> We always build a new OptionsStrategy here and carry over the previous 
> options 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalSource.java#L116-L122]
> as OptionsStrategy itself is immutable and we cannot add new options after 
> creating it.
>  
> We build the traversal strategies set and bytecode here:
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalSource.java#L132-L133]
>  
> The traversal strategies set itself is built correctly and we remove 
> duplicates 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversalStrategies.java#L42-L50]
>  
> But Bytecode just appends the new strategy as instruction 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Bytecode.java#L82-L83]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3110) Incorrect Bytecode when multiple options are used in traversal

2024-09-04 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3110:
---

kenhuuu commented on PR #2757:
URL: https://github.com/apache/tinkerpop/pull/2757#issuecomment-2329713229

   Is there a test for the problem stated in TINKERPOP-3110? A test that 
asserts that if multiple with() are used that it is combined into a single 
OptionsStrategy that contains all the options from all the with()s?




> Incorrect Bytecode when multiple options are used in traversal
> --
>
> Key: TINKERPOP-3110
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3110
> Project: TinkerPop
>  Issue Type: Bug
>  Components: server
>Reporter: Saikiran Boga
>Priority: Major
>
> When multiple options like with("x",1).with("y",1) are used to build a 
> traversal, the Bytecode building logic when constructing the traversal on the 
> server keeps appending the Bytecode incrementally instead of replacing the 
> previous Bytecode instruction.
> For a query like below:
> {code:java}
> g
> .with('evaluationTimeout',30L)
> .with('a', 1)
> .with('b', 2)
> .with('c', 3)
> .V(){code}
> The Bytecode attached to traversal looks as:
> {code:java}
> g
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2, c: (int) 3))
> .V() {code}
> Instead it should be just single instruction for OptionsStrategy as:
>  
> {code:java}
> g
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2, c: (int) 3))
> .V() {code}
>  
> We always build a new OptionsStrategy here and carry over the previous 
> options 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalSource.java#L116-L122]
> as OptionsStrategy itself is immutable and we cannot add new options after 
> creating it.
>  
> We build the traversal strategies set and bytecode here:
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalSource.java#L132-L133]
>  
> The traversal strategies set itself is built correctly and we remove 
> duplicates 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversalStrategies.java#L42-L50]
>  
> But Bytecode just appends the new strategy as instruction 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Bytecode.java#L82-L83]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3110) Incorrect Bytecode when multiple options are used in traversal

2024-09-04 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3110:
---

kenhuuu commented on code in PR #2757:
URL: https://github.com/apache/tinkerpop/pull/2757#discussion_r1744237332


##
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/BytecodeHelper.java:
##
@@ -350,6 +351,26 @@ public static  Iterator 
findStrategies(final Byt
 os -> (A) os.getArguments()[0]);
 }
 
+public static  boolean removeStrategies(final 
Bytecode bytecode, final String operator, final Class[] 
clazzes) {

Review Comment:
   Is ``  needed? `A` doesn't seem to be used.





> Incorrect Bytecode when multiple options are used in traversal
> --
>
> Key: TINKERPOP-3110
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3110
> Project: TinkerPop
>  Issue Type: Bug
>  Components: server
>Reporter: Saikiran Boga
>Priority: Major
>
> When multiple options like with("x",1).with("y",1) are used to build a 
> traversal, the Bytecode building logic when constructing the traversal on the 
> server keeps appending the Bytecode incrementally instead of replacing the 
> previous Bytecode instruction.
> For a query like below:
> {code:java}
> g
> .with('evaluationTimeout',30L)
> .with('a', 1)
> .with('b', 2)
> .with('c', 3)
> .V(){code}
> The Bytecode attached to traversal looks as:
> {code:java}
> g
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2, c: (int) 3))
> .V() {code}
> Instead it should be just single instruction for OptionsStrategy as:
>  
> {code:java}
> g
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2, c: (int) 3))
> .V() {code}
>  
> We always build a new OptionsStrategy here and carry over the previous 
> options 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalSource.java#L116-L122]
> as OptionsStrategy itself is immutable and we cannot add new options after 
> creating it.
>  
> We build the traversal strategies set and bytecode here:
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalSource.java#L132-L133]
>  
> The traversal strategies set itself is built correctly and we remove 
> duplicates 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversalStrategies.java#L42-L50]
>  
> But Bytecode just appends the new strategy as instruction 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Bytecode.java#L82-L83]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3110) Incorrect Bytecode when multiple options are used in traversal

2024-09-04 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3110:
---

saikiranboga commented on PR #2757:
URL: https://github.com/apache/tinkerpop/pull/2757#issuecomment-2328895655

   > i can't help wondering if you need additional tests. is there an existing 
test that ensures that we don't have duplicate strategies in bytecode anymore?
   
   @spmallette, Added few more tests. We do have some tests around strategy 
validation, but not for duplicate checking.
   
   




> Incorrect Bytecode when multiple options are used in traversal
> --
>
> Key: TINKERPOP-3110
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3110
> Project: TinkerPop
>  Issue Type: Bug
>  Components: server
>Reporter: Saikiran Boga
>Priority: Major
>
> When multiple options like with("x",1).with("y",1) are used to build a 
> traversal, the Bytecode building logic when constructing the traversal on the 
> server keeps appending the Bytecode incrementally instead of replacing the 
> previous Bytecode instruction.
> For a query like below:
> {code:java}
> g
> .with('evaluationTimeout',30L)
> .with('a', 1)
> .with('b', 2)
> .with('c', 3)
> .V(){code}
> The Bytecode attached to traversal looks as:
> {code:java}
> g
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2, c: (int) 3))
> .V() {code}
> Instead it should be just single instruction for OptionsStrategy as:
>  
> {code:java}
> g
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2, c: (int) 3))
> .V() {code}
>  
> We always build a new OptionsStrategy here and carry over the previous 
> options 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalSource.java#L116-L122]
> as OptionsStrategy itself is immutable and we cannot add new options after 
> creating it.
>  
> We build the traversal strategies set and bytecode here:
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalSource.java#L132-L133]
>  
> The traversal strategies set itself is built correctly and we remove 
> duplicates 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversalStrategies.java#L42-L50]
>  
> But Bytecode just appends the new strategy as instruction 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Bytecode.java#L82-L83]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3110) Incorrect Bytecode when multiple options are used in traversal

2024-09-04 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3110:
---

saikiranboga commented on code in PR #2757:
URL: https://github.com/apache/tinkerpop/pull/2757#discussion_r1743706799


##
CHANGELOG.asciidoc:
##
@@ -38,6 +38,7 @@ This release also includes changes from <>.
 * Added getter method to `ConcatStep`, `ConjoinStep`, `SplitGlobalStep` and 
`SplitLocalStep` for their private fields.
 * Gremlin Server docker containers shutdown gracefully when receiving a 
SIGTERM.
 * TINKERPOP-3080 Support to specify Operator as a reducer in withSideEffect 
when parsing with the grammar
+* TINKERPOP-3110 Fixed bug in Bytecode build logic for strategies

Review Comment:
   Removed JIRA ref. and expanded on the bug.





> Incorrect Bytecode when multiple options are used in traversal
> --
>
> Key: TINKERPOP-3110
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3110
> Project: TinkerPop
>  Issue Type: Bug
>  Components: server
>Reporter: Saikiran Boga
>Priority: Major
>
> When multiple options like with("x",1).with("y",1) are used to build a 
> traversal, the Bytecode building logic when constructing the traversal on the 
> server keeps appending the Bytecode incrementally instead of replacing the 
> previous Bytecode instruction.
> For a query like below:
> {code:java}
> g
> .with('evaluationTimeout',30L)
> .with('a', 1)
> .with('b', 2)
> .with('c', 3)
> .V(){code}
> The Bytecode attached to traversal looks as:
> {code:java}
> g
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2, c: (int) 3))
> .V() {code}
> Instead it should be just single instruction for OptionsStrategy as:
>  
> {code:java}
> g
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2, c: (int) 3))
> .V() {code}
>  
> We always build a new OptionsStrategy here and carry over the previous 
> options 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalSource.java#L116-L122]
> as OptionsStrategy itself is immutable and we cannot add new options after 
> creating it.
>  
> We build the traversal strategies set and bytecode here:
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalSource.java#L132-L133]
>  
> The traversal strategies set itself is built correctly and we remove 
> duplicates 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversalStrategies.java#L42-L50]
>  
> But Bytecode just appends the new strategy as instruction 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Bytecode.java#L82-L83]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3110) Incorrect Bytecode when multiple options are used in traversal

2024-09-04 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3110:
---

spmallette commented on PR #2757:
URL: https://github.com/apache/tinkerpop/pull/2757#issuecomment-2328610840

   i can't help wondering if you need additional tests. is there an existing 
test that ensures that we don't have duplicate strategies in bytecode anymore? 




> Incorrect Bytecode when multiple options are used in traversal
> --
>
> Key: TINKERPOP-3110
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3110
> Project: TinkerPop
>  Issue Type: Bug
>  Components: server
>Reporter: Saikiran Boga
>Priority: Major
>
> When multiple options like with("x",1).with("y",1) are used to build a 
> traversal, the Bytecode building logic when constructing the traversal on the 
> server keeps appending the Bytecode incrementally instead of replacing the 
> previous Bytecode instruction.
> For a query like below:
> {code:java}
> g
> .with('evaluationTimeout',30L)
> .with('a', 1)
> .with('b', 2)
> .with('c', 3)
> .V(){code}
> The Bytecode attached to traversal looks as:
> {code:java}
> g
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2, c: (int) 3))
> .V() {code}
> Instead it should be just single instruction for OptionsStrategy as:
>  
> {code:java}
> g
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2, c: (int) 3))
> .V() {code}
>  
> We always build a new OptionsStrategy here and carry over the previous 
> options 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalSource.java#L116-L122]
> as OptionsStrategy itself is immutable and we cannot add new options after 
> creating it.
>  
> We build the traversal strategies set and bytecode here:
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalSource.java#L132-L133]
>  
> The traversal strategies set itself is built correctly and we remove 
> duplicates 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversalStrategies.java#L42-L50]
>  
> But Bytecode just appends the new strategy as instruction 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Bytecode.java#L82-L83]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3110) Incorrect Bytecode when multiple options are used in traversal

2024-09-04 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3110:
---

spmallette commented on code in PR #2757:
URL: https://github.com/apache/tinkerpop/pull/2757#discussion_r1743553054


##
CHANGELOG.asciidoc:
##
@@ -38,6 +38,7 @@ This release also includes changes from <>.
 * Added getter method to `ConcatStep`, `ConjoinStep`, `SplitGlobalStep` and 
`SplitLocalStep` for their private fields.
 * Gremlin Server docker containers shutdown gracefully when receiving a 
SIGTERM.
 * TINKERPOP-3080 Support to specify Operator as a reducer in withSideEffect 
when parsing with the grammar
+* TINKERPOP-3110 Fixed bug in Bytecode build logic for strategies

Review Comment:
   the JIRA reference should not be in the CHANGELOG (i know its in the entry 
above, but that's not correct either). JIRA references are added on release in 
a separate listing. also, could this be a bit more specific by including a few 
words about what the "bug" was?





> Incorrect Bytecode when multiple options are used in traversal
> --
>
> Key: TINKERPOP-3110
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3110
> Project: TinkerPop
>  Issue Type: Bug
>  Components: server
>Reporter: Saikiran Boga
>Priority: Major
>
> When multiple options like with("x",1).with("y",1) are used to build a 
> traversal, the Bytecode building logic when constructing the traversal on the 
> server keeps appending the Bytecode incrementally instead of replacing the 
> previous Bytecode instruction.
> For a query like below:
> {code:java}
> g
> .with('evaluationTimeout',30L)
> .with('a', 1)
> .with('b', 2)
> .with('c', 3)
> .V(){code}
> The Bytecode attached to traversal looks as:
> {code:java}
> g
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2))
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2, c: (int) 3))
> .V() {code}
> Instead it should be just single instruction for OptionsStrategy as:
>  
> {code:java}
> g
> .withStrategies(new 
> org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout:
>  30L, a: (int) 1, b: (int) 2, c: (int) 3))
> .V() {code}
>  
> We always build a new OptionsStrategy here and carry over the previous 
> options 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalSource.java#L116-L122]
> as OptionsStrategy itself is immutable and we cannot add new options after 
> creating it.
>  
> We build the traversal strategies set and bytecode here:
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalSource.java#L132-L133]
>  
> The traversal strategies set itself is built correctly and we remove 
> duplicates 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversalStrategies.java#L42-L50]
>  
> But Bytecode just appends the new strategy as instruction 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Bytecode.java#L82-L83]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3110) Incorrect Bytecode when multiple options are used in traversal

2024-09-03 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3110:
---

codecov-commenter commented on PR #2757:
URL: https://github.com/apache/tinkerpop/pull/2757#issuecomment-2327062224

   ## 
[Codecov](https://app.codecov.io/gh/apache/tinkerpop/pull/2757?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   Attention: Patch coverage is `86.36364%` with `3 lines` in your changes 
missing coverage. Please review.
   > Project coverage is 76.41%. Comparing base 
[(`9b46b67`)](https://app.codecov.io/gh/apache/tinkerpop/commit/9b46b6777d2fa250e41daacf2fa4554605aff53a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 to head 
[(`fc6e3ee`)](https://app.codecov.io/gh/apache/tinkerpop/commit/fc6e3ee30cad3549b49ad9d020db49942da22f95?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 201 commits behind head on 3.7-dev.
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/tinkerpop/pull/2757?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[.../tinkerpop/gremlin/process/traversal/Bytecode.java](https://app.codecov.io/gh/apache/tinkerpop/pull/2757?src=pr&el=tree&filepath=gremlin-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Ftinkerpop%2Fgremlin%2Fprocess%2Ftraversal%2FBytecode.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9wcm9jZXNzL3RyYXZlcnNhbC9CeXRlY29kZS5qYXZh)
 | 83.33% | [1 Missing and 1 partial :warning: 
](https://app.codecov.io/gh/apache/tinkerpop/pull/2757?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...gremlin/process/traversal/util/BytecodeHelper.java](https://app.codecov.io/gh/apache/tinkerpop/pull/2757?src=pr&el=tree&filepath=gremlin-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Ftinkerpop%2Fgremlin%2Fprocess%2Ftraversal%2Futil%2FBytecodeHelper.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9wcm9jZXNzL3RyYXZlcnNhbC91dGlsL0J5dGVjb2RlSGVscGVyLmphdmE=)
 | 90.00% | [0 Missing and 1 partial :warning: 
](https://app.codecov.io/gh/apache/tinkerpop/pull/2757?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   
   Additional details and impacted files
   
   
   ```diff
   @@  Coverage Diff  @@
   ## 3.7-dev#2757  +/-   ##
   =
   + Coverage  76.14%   76.41%   +0.27% 
   - Complexity 1315213203  +51 
   =
 Files   1084 1060  -24 
 Lines  6516061439-3721 
 Branches7285 7315  +30 
   =
   - Hits   4961646950-2666 
   + Misses 1283911973 -866 
   + Partials2705 2516 -189 
   ```
   
   
   
   [:umbrella: View full report in Codecov by 
Sentry](https://app.codecov.io/gh/apache/tinkerpop/pull/2757?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   :loudspeaker: Have feedback on the report? [Share it 
here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   




> Incorrect Bytecode when multiple options are used in traversal
> --
>
> Key: TINKERPOP-3110
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3110
> Project: TinkerPop
>  Issue Type: Bug
>  Components: server
>Reporter: Saikiran Boga
>Priority: Major
>
> When multiple options like with("x",1).with("y",1) are used to build a 
> traversal, the Bytecode building logic when construct

[jira] [Commented] (TINKERPOP-3105) Running 3.6.x python-driver with 3.7.x server leads to deserialization errors

2024-08-28 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3105:
---

xiazcy commented on code in PR #2742:
URL: https://github.com/apache/tinkerpop/pull/2742#discussion_r1735218349


##
docs/src/reference/gremlin-applications.asciidoc:
##
@@ -2336,6 +2336,44 @@ List results = 
g.V().hasLabel("person").elementMap('name').toList();
 
 Both of the above requests return a list of `Map` instances that contain the 
`id`, `label` and the "name" property.
 
+*Compatibility*
+
+*It is not recommended to use older driver versions with 3.7.x Gremlin 
Server*, as some older drivers do not construct
+graph elements with properties and thus are not designed to handle the 
returned properties by default; however, compatibility
+can be achieved by configuring `ReferenceElementStrategy` in the server such 
that properties are not returned.
+Per-request configuration option `materializeProperties` is not supported 
older driver versions.
+
+Also note that older drivers of different language variants will handle 
incoming properties differently with different
+serializers used. Drivers using `GraphSON` serializers will remain compatible, 
but may encounter deserialization errors
+with `GraphBinary`. Below is a table documenting GLV behaviors using 
`GraphBinary` when properties are returned by the
+default 3.7.x server, as well as if `ReferenceElementStrategy` is configured 
on the server (i.e. the expected behavior
+from a 3.6.x server). This behavior can be observed with the results of 
`g.V().next()`.
+
+[cols="1,1,1"]
+|===
+|3.6.x drivers with `GraphBinary` |Behavior with default 3.7.x Server | 
Behavior with `ReferenceElementStrategy`
+
+|`gremlin-driver`
+|Returns empty iterator
+|Returns empty iterator
+
+|`gremlin-dotnet`
+|Skips properties in Elements
+|Skips properties in Elements
+
+|`gremlin-javascript`
+|Deserialization error
+|Returns null
+
+|`gremlin-python`
+|Deserialization error
+|Skips properties in Elements
+
+|`gremlin-go`
+|Deserialization error
+|Skips properties in Elements

Review Comment:
   By skip, I mean those GLVs don't have `properties` in their `Vertex` object, 
so actually the `vertex.properties` are non-existent keys/attributes. I can 
make that part more clear. 





> Running 3.6.x python-driver with 3.7.x server leads to deserialization errors
> -
>
> Key: TINKERPOP-3105
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3105
> Project: TinkerPop
>  Issue Type: Bug
>  Components: io, python, server
>Affects Versions: 3.7.2
>Reporter: Yang Xia
>Priority: Blocker
>
> Running 3.6.x {{gremlin-python}} with 3.7.x {{gremlin-server}} leads to 
> serialization errors:
> {code:java}
> return self.deserializers[DataType(bt)].objectify(buff, self, nullable)
> KeyError: {code}
> with or without using {{ReferenceElementStrategy}} set on the server, 
> possibly due to a bug in how properties are being serialized and returned 
> from Java that is not inline with the specification. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3105) Running 3.6.x python-driver with 3.7.x server leads to deserialization errors

2024-08-28 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3105:
---

Cole-Greer commented on code in PR #2742:
URL: https://github.com/apache/tinkerpop/pull/2742#discussion_r1734955846


##
docs/src/reference/gremlin-applications.asciidoc:
##
@@ -2336,6 +2336,44 @@ List results = 
g.V().hasLabel("person").elementMap('name').toList();
 
 Both of the above requests return a list of `Map` instances that contain the 
`id`, `label` and the "name" property.
 
+*Compatibility*
+
+*It is not recommended to use older driver versions with 3.7.x Gremlin 
Server*, as some older drivers do not construct

Review Comment:
   ```suggestion
   *It is not recommended to use 3.6.x or below driver versions with 3.7.x or 
above Gremlin Server*, as some older drivers do not construct
   ```
   This might be a bit more future proof as new releases go out.



##
docs/src/reference/gremlin-applications.asciidoc:
##
@@ -2336,6 +2336,44 @@ List results = 
g.V().hasLabel("person").elementMap('name').toList();
 
 Both of the above requests return a list of `Map` instances that contain the 
`id`, `label` and the "name" property.
 
+*Compatibility*
+
+*It is not recommended to use older driver versions with 3.7.x Gremlin 
Server*, as some older drivers do not construct
+graph elements with properties and thus are not designed to handle the 
returned properties by default; however, compatibility
+can be achieved by configuring `ReferenceElementStrategy` in the server such 
that properties are not returned.
+Per-request configuration option `materializeProperties` is not supported 
older driver versions.
+
+Also note that older drivers of different language variants will handle 
incoming properties differently with different
+serializers used. Drivers using `GraphSON` serializers will remain compatible, 
but may encounter deserialization errors
+with `GraphBinary`. Below is a table documenting GLV behaviors using 
`GraphBinary` when properties are returned by the
+default 3.7.x server, as well as if `ReferenceElementStrategy` is configured 
on the server (i.e. the expected behavior
+from a 3.6.x server). This behavior can be observed with the results of 
`g.V().next()`.
+
+[cols="1,1,1"]
+|===
+|3.6.x drivers with `GraphBinary` |Behavior with default 3.7.x Server | 
Behavior with `ReferenceElementStrategy`
+
+|`gremlin-driver`
+|Returns empty iterator
+|Returns empty iterator
+
+|`gremlin-dotnet`
+|Skips properties in Elements
+|Skips properties in Elements
+
+|`gremlin-javascript`
+|Deserialization error
+|Returns null
+
+|`gremlin-python`
+|Deserialization error
+|Skips properties in Elements
+
+|`gremlin-go`
+|Deserialization error
+|Skips properties in Elements

Review Comment:
   Some of these may still be confusing for some users. It's not clear what the 
result of skipping properties will be. It might be best to focus on what the 
actual de-serialized vertex will look like (when there's no deserialization 
errors). Something like `vertex.properties = []` and `vertex.properties = null`





> Running 3.6.x python-driver with 3.7.x server leads to deserialization errors
> -
>
> Key: TINKERPOP-3105
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3105
> Project: TinkerPop
>  Issue Type: Bug
>  Components: io, python, server
>Affects Versions: 3.7.2
>Reporter: Yang Xia
>Priority: Blocker
>
> Running 3.6.x {{gremlin-python}} with 3.7.x {{gremlin-server}} leads to 
> serialization errors:
> {code:java}
> return self.deserializers[DataType(bt)].objectify(buff, self, nullable)
> KeyError: {code}
> with or without using {{ReferenceElementStrategy}} set on the server, 
> possibly due to a bug in how properties are being serialized and returned 
> from Java that is not inline with the specification. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3080) AggregateStep can support all Operators predefined in TinkerPop

2024-08-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3080:
---

Cole-Greer merged PR #2616:
URL: https://github.com/apache/tinkerpop/pull/2616




> AggregateStep can support all Operators predefined in TinkerPop
> ---
>
> Key: TINKERPOP-3080
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3080
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language, process
>Reporter: Norio Akagi
>Priority: Major
> Fix For: 3.7.3
>
>
> Currently, {{AggreteGlobalStep}} and {{AggreteLocalStep}} only support addAll 
> and assign as Operator. This is because they use BulkSet to apply to 
> Operator. Only addAll and assign can work with BulkSet, so for other 
> operators it results in a type casting failure.
> They can be more flexible to work with any operators depending on what is set 
> by {{{}withSideEffect(){}}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3083) The split() step should provide a way to split an entire string

2024-08-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3083:
---

Cole-Greer merged PR #2741:
URL: https://github.com/apache/tinkerpop/pull/2741




> The split() step should provide a way to split an entire string
> ---
>
> Key: TINKERPOP-3083
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3083
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language, process
>Affects Versions: 3.7.2
>Reporter: Kelvin Lawrence
>Priority: Critical
>
> There are many use cases where it is helpful to be able to split an entire 
> string into an array of characters. In other query languages, passing in a 
> null string ('') as the parameter achieves this. I believe the Gremlin step 
> should behave the same way. For example
> Current behavior
> {code:java}
> g.inject('Hello').split('')
> ['Hello']{code}
> Proposed new behavior
> {code:java}
> g.inject('Hello').split('')
> ['H','e','l','l','o']{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3083) The split() step should provide a way to split an entire string

2024-08-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3083:
---

xiazcy commented on PR #2741:
URL: https://github.com/apache/tinkerpop/pull/2741#issuecomment-2313754041

   VOTE +1, thanks @andreachild!




> The split() step should provide a way to split an entire string
> ---
>
> Key: TINKERPOP-3083
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3083
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language, process
>Affects Versions: 3.7.2
>Reporter: Kelvin Lawrence
>Priority: Critical
>
> There are many use cases where it is helpful to be able to split an entire 
> string into an array of characters. In other query languages, passing in a 
> null string ('') as the parameter achieves this. I believe the Gremlin step 
> should behave the same way. For example
> Current behavior
> {code:java}
> g.inject('Hello').split('')
> ['Hello']{code}
> Proposed new behavior
> {code:java}
> g.inject('Hello').split('')
> ['H','e','l','l','o']{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3080) AggregateStep can support all Operators predefined in TinkerPop

2024-08-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3080:
---

kenhuuu commented on PR #2616:
URL: https://github.com/apache/tinkerpop/pull/2616#issuecomment-2313679359

   VOTE +1




> AggregateStep can support all Operators predefined in TinkerPop
> ---
>
> Key: TINKERPOP-3080
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3080
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language, process
>Reporter: Norio Akagi
>Priority: Major
> Fix For: 3.7.3
>
>
> Currently, {{AggreteGlobalStep}} and {{AggreteLocalStep}} only support addAll 
> and assign as Operator. This is because they use BulkSet to apply to 
> Operator. Only addAll and assign can work with BulkSet, so for other 
> operators it results in a type casting failure.
> They can be more flexible to work with any operators depending on what is set 
> by {{{}withSideEffect(){}}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3080) AggregateStep can support all Operators predefined in TinkerPop

2024-08-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3080:
---

Cole-Greer commented on PR #2616:
URL: https://github.com/apache/tinkerpop/pull/2616#issuecomment-2313626727

   Thanks @rdtr, LGTM VOTE +1




> AggregateStep can support all Operators predefined in TinkerPop
> ---
>
> Key: TINKERPOP-3080
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3080
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language, process
>Reporter: Norio Akagi
>Priority: Major
> Fix For: 3.7.3
>
>
> Currently, {{AggreteGlobalStep}} and {{AggreteLocalStep}} only support addAll 
> and assign as Operator. This is because they use BulkSet to apply to 
> Operator. Only addAll and assign can work with BulkSet, so for other 
> operators it results in a type casting failure.
> They can be more flexible to work with any operators depending on what is set 
> by {{{}withSideEffect(){}}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3080) AggregateStep can support all Operators predefined in TinkerPop

2024-08-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3080:
---

rdtr commented on code in PR #2616:
URL: https://github.com/apache/tinkerpop/pull/2616#discussion_r1733446349


##
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Operator.java:
##
@@ -113,6 +133,11 @@ public Object apply(final Object a, final Object b) {
 public Object apply(final Object a, final Object b) {
 return b;
 }
+
+@Override
+public boolean isCommutative() {

Review Comment:
   isCommutative is a confusing name, `assign` may be also the one but it is 
already used in GraphComputer's code internally. I just want to exclude `div` 
and `minus` at the moment, let's create a static list to disable execution for 
them.





> AggregateStep can support all Operators predefined in TinkerPop
> ---
>
> Key: TINKERPOP-3080
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3080
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language, process
>Reporter: Norio Akagi
>Priority: Major
> Fix For: 3.7.3
>
>
> Currently, {{AggreteGlobalStep}} and {{AggreteLocalStep}} only support addAll 
> and assign as Operator. This is because they use BulkSet to apply to 
> Operator. Only addAll and assign can work with BulkSet, so for other 
> operators it results in a type casting failure.
> They can be more flexible to work with any operators depending on what is set 
> by {{{}withSideEffect(){}}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3080) AggregateStep can support all Operators predefined in TinkerPop

2024-08-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3080:
---

Cole-Greer commented on code in PR #2616:
URL: https://github.com/apache/tinkerpop/pull/2616#discussion_r1733252401


##
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Operator.java:
##
@@ -113,6 +133,11 @@ public Object apply(final Object a, final Object b) {
 public Object apply(final Object a, final Object b) {
 return b;
 }
+
+@Override
+public boolean isCommutative() {

Review Comment:
   I believe assignment should be non-commutative.



##
gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/sideEffect/Aggregate.feature:
##
@@ -144,145 +144,435 @@ Feature: Step - aggregate()
   Scenario: g_V_aggregateXlocal_a_nameX_out_capXaX
 Given the modern graph
 And the traversal of
-  """
-  g.V().aggregate(Scope.local,"a").by("name").out().cap("a")
-  """
+"""
+g.V().aggregate(Scope.local,"a").by("name").out().cap("a")
+"""
 When iterated next
 Then the result should be unordered
-  | result |
-  | marko |
-  | vadas |
-  | lop |
-  | josh |
-  | ripple |
-  | peter  |
+| result |
+| marko |
+| vadas |
+| lop |
+| josh |
+| ripple |
+| peter  |
 
   Scenario: 
g_VX1X_aggregateXlocal_aX_byXnameX_out_aggregateXlocal_aX_byXnameX_name_capXaX
 Given the modern graph
 And using the parameter vid1 defined as "v[marko].id"
 And the traversal of
-  """
-  
g.V(vid1).aggregate(Scope.local,"a").by("name").out().aggregate(Scope.local,"a").by("name").values("name").cap("a")
-  """
+"""
+
g.V(vid1).aggregate(Scope.local,"a").by("name").out().aggregate(Scope.local,"a").by("name").values("name").cap("a")
+"""
 When iterated next
 Then the result should be unordered
-  | result |
-  | marko |
-  | vadas |
-  | lop |
-  | josh |
+| result |
+| marko |
+| vadas |
+| lop |
+| josh |
 
   Scenario: g_withSideEffectXa_setX_V_both_name_aggregateXlocal_aX_capXaX
 Given the modern graph
 And using the parameter xx1 defined as "s[]"
 And the traversal of
-  """
-  g.withSideEffect("a", 
xx1).V().both().values("name").aggregate(Scope.local,"a").cap("a")
-  """
+"""
+g.withSideEffect("a", 
xx1).V().both().values("name").aggregate(Scope.local,"a").cap("a")
+"""
 When iterated next
 Then the result should be unordered
-  | result |
-  | marko |
-  | vadas |
-  | lop |
-  | josh |
-  | ripple |
-  | peter  |
+| result |
+| marko |
+| vadas |
+| lop |
+| josh |
+| ripple |
+| peter  |
 
   Scenario: 
g_V_aggregateXlocal_aX_byXoutEXcreatedX_countX_out_out_aggregateXlocal_aX_byXinEXcreatedX_weight_sumX
 Given the modern graph
 And the traversal of
-  """
-  g.V().aggregate(Scope.local,"a").
- by(__.outE("created").count()).
-out().out().aggregate(Scope.local,"a").
-  by(__.inE("created").values("weight").sum()).
-cap("a")
-  """
+"""
+g.V().aggregate(Scope.local,"a").
+by(__.outE("created").count()).
+out().out().aggregate(Scope.local,"a").
+by(__.inE("created").values("weight").sum()).
+cap("a")
+"""
 When iterated next
 Then the result should be unordered
-  | result |
-  | d[1].l |
-  | d[1].l |
-  | d[0].l |
-  | d[0].l |
-  | d[0].l |
-  | d[2].l |
-  | d[1.0].d |
-  | d[1.0].d |
+| result |
+| d[1].l |
+| d[1].l |
+| d[0].l |
+| d[0].l |
+| d[0].l |
+| d[2].l |
+| d[1.0].d |
+| d[1.0].d |
 
   Scenario: g_V_aggregateXxX_byXvaluesXageX_isXgtX29XXX_capXxX
 Given the modern graph
 And the traversal of
-  """
-  g.V().aggregate("x").by(__.values("age").is(P.gt(29))).cap("x")
-  """
+"""
+g.V().aggregate("x").by(__.values("age").is(P.gt(29))).cap("x

[jira] [Commented] (TINKERPOP-3080) AggregateStep can support all Operators predefined in TinkerPop

2024-08-26 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3080:
---

xiazcy commented on PR #2616:
URL: https://github.com/apache/tinkerpop/pull/2616#issuecomment-2311316120

   VOTE +1. Thanks @rdtr! 
   Since you weren't able to generate the feature test file for the GLVs, we'll 
have whoever's merging CTR them in. 




> AggregateStep can support all Operators predefined in TinkerPop
> ---
>
> Key: TINKERPOP-3080
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3080
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language, process
>Reporter: Norio Akagi
>Priority: Major
> Fix For: 3.7.3
>
>
> Currently, {{AggreteGlobalStep}} and {{AggreteLocalStep}} only support addAll 
> and assign as Operator. This is because they use BulkSet to apply to 
> Operator. Only addAll and assign can work with BulkSet, so for other 
> operators it results in a type casting failure.
> They can be more flexible to work with any operators depending on what is set 
> by {{{}withSideEffect(){}}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3105) Running 3.6.x python-driver with 3.7.x server leads to deserialization errors

2024-08-26 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3105:
---

xiazcy commented on PR #2742:
URL: https://github.com/apache/tinkerpop/pull/2742#issuecomment-2310591913

   > Does GraphSON have these problems with 3.6.x drivers connecting to 3.7x 
servers?
   
   No, GraphSON works fine, I've only seen errors in GraphBinary when I tested 
them. I'll update the docs to specify that. 




> Running 3.6.x python-driver with 3.7.x server leads to deserialization errors
> -
>
> Key: TINKERPOP-3105
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3105
> Project: TinkerPop
>  Issue Type: Bug
>  Components: io, python, server
>Affects Versions: 3.7.2
>Reporter: Yang Xia
>Priority: Blocker
>
> Running 3.6.x {{gremlin-python}} with 3.7.x {{gremlin-server}} leads to 
> serialization errors:
> {code:java}
> return self.deserializers[DataType(bt)].objectify(buff, self, nullable)
> KeyError: {code}
> with or without using {{ReferenceElementStrategy}} set on the server, 
> possibly due to a bug in how properties are being serialized and returned 
> from Java that is not inline with the specification. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3080) AggregateStep can support all Operators predefined in TinkerPop

2024-08-26 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3080:
---

rdtr commented on code in PR #2616:
URL: https://github.com/apache/tinkerpop/pull/2616#discussion_r1730783208


##
gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/sideEffect/Aggregate.feature:
##
@@ -144,145 +144,490 @@ Feature: Step - aggregate()
   Scenario: g_V_aggregateXlocal_a_nameX_out_capXaX
 Given the modern graph
 And the traversal of
-  """
-  g.V().aggregate(Scope.local,"a").by("name").out().cap("a")
-  """
+"""
+g.V().aggregate(Scope.local,"a").by("name").out().cap("a")
+"""
 When iterated next
 Then the result should be unordered
-  | result |
-  | marko |
-  | vadas |
-  | lop |
-  | josh |
-  | ripple |
-  | peter  |
+| result |
+| marko |
+| vadas |
+| lop |
+| josh |
+| ripple |
+| peter  |
 
   Scenario: 
g_VX1X_aggregateXlocal_aX_byXnameX_out_aggregateXlocal_aX_byXnameX_name_capXaX
 Given the modern graph
 And using the parameter vid1 defined as "v[marko].id"
 And the traversal of
-  """
-  
g.V(vid1).aggregate(Scope.local,"a").by("name").out().aggregate(Scope.local,"a").by("name").values("name").cap("a")
-  """
+"""
+
g.V(vid1).aggregate(Scope.local,"a").by("name").out().aggregate(Scope.local,"a").by("name").values("name").cap("a")
+"""
 When iterated next
 Then the result should be unordered
-  | result |
-  | marko |
-  | vadas |
-  | lop |
-  | josh |
+| result |
+| marko |
+| vadas |
+| lop |
+| josh |
 
   Scenario: g_withSideEffectXa_setX_V_both_name_aggregateXlocal_aX_capXaX
 Given the modern graph
 And using the parameter xx1 defined as "s[]"
 And the traversal of
-  """
-  g.withSideEffect("a", 
xx1).V().both().values("name").aggregate(Scope.local,"a").cap("a")
-  """
+"""
+g.withSideEffect("a", 
xx1).V().both().values("name").aggregate(Scope.local,"a").cap("a")
+"""
 When iterated next
 Then the result should be unordered
-  | result |
-  | marko |
-  | vadas |
-  | lop |
-  | josh |
-  | ripple |
-  | peter  |
+| result |
+| marko |
+| vadas |
+| lop |
+| josh |
+| ripple |
+| peter  |
 
   Scenario: 
g_V_aggregateXlocal_aX_byXoutEXcreatedX_countX_out_out_aggregateXlocal_aX_byXinEXcreatedX_weight_sumX
 Given the modern graph
 And the traversal of
-  """
-  g.V().aggregate(Scope.local,"a").
- by(__.outE("created").count()).
-out().out().aggregate(Scope.local,"a").
-  by(__.inE("created").values("weight").sum()).
-cap("a")
-  """
+"""
+g.V().aggregate(Scope.local,"a").
+by(__.outE("created").count()).
+out().out().aggregate(Scope.local,"a").
+by(__.inE("created").values("weight").sum()).
+cap("a")
+"""
 When iterated next
 Then the result should be unordered
-  | result |
-  | d[1].l |
-  | d[1].l |
-  | d[0].l |
-  | d[0].l |
-  | d[0].l |
-  | d[2].l |
-  | d[1.0].d |
-  | d[1.0].d |
+| result |
+| d[1].l |
+| d[1].l |
+| d[0].l |
+| d[0].l |
+| d[0].l |
+| d[2].l |
+| d[1.0].d |
+| d[1.0].d |
 
   Scenario: g_V_aggregateXxX_byXvaluesXageX_isXgtX29XXX_capXxX
 Given the modern graph
 And the traversal of
-  """
-  g.V().aggregate("x").by(__.values("age").is(P.gt(29))).cap("x")
-  """
+"""
+g.V().aggregate("x").by(__.values("age").is(P.gt(29))).cap("x")
+"""
 When iterated next
 Then the result should be unordered
-  | result |
-  | d[32].i |
-  | d[35].i |
+| result |
+| d[32].i |
+| d[35].i |
 
   @WithProductiveByStrategy
   Scenario: 
g_withStrategiesXProductiveByStrategyX_V_aggregateXxX_byXvaluesXageX_isXgtX29XXX_capXxX
 Given the modern graph
 And the traversal of
-  ""&quo

[jira] [Commented] (TINKERPOP-3080) AggregateStep can support all Operators predefined in TinkerPop

2024-08-26 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3080:
---

rdtr commented on code in PR #2616:
URL: https://github.com/apache/tinkerpop/pull/2616#discussion_r1730781154


##
gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/sideEffect/Aggregate.feature:
##
@@ -144,145 +144,490 @@ Feature: Step - aggregate()
   Scenario: g_V_aggregateXlocal_a_nameX_out_capXaX
 Given the modern graph
 And the traversal of
-  """
-  g.V().aggregate(Scope.local,"a").by("name").out().cap("a")
-  """
+"""
+g.V().aggregate(Scope.local,"a").by("name").out().cap("a")
+"""
 When iterated next
 Then the result should be unordered
-  | result |
-  | marko |
-  | vadas |
-  | lop |
-  | josh |
-  | ripple |
-  | peter  |
+| result |
+| marko |
+| vadas |
+| lop |
+| josh |
+| ripple |
+| peter  |
 
   Scenario: 
g_VX1X_aggregateXlocal_aX_byXnameX_out_aggregateXlocal_aX_byXnameX_name_capXaX
 Given the modern graph
 And using the parameter vid1 defined as "v[marko].id"
 And the traversal of
-  """
-  
g.V(vid1).aggregate(Scope.local,"a").by("name").out().aggregate(Scope.local,"a").by("name").values("name").cap("a")
-  """
+"""
+
g.V(vid1).aggregate(Scope.local,"a").by("name").out().aggregate(Scope.local,"a").by("name").values("name").cap("a")
+"""
 When iterated next
 Then the result should be unordered
-  | result |
-  | marko |
-  | vadas |
-  | lop |
-  | josh |
+| result |
+| marko |
+| vadas |
+| lop |
+| josh |
 
   Scenario: g_withSideEffectXa_setX_V_both_name_aggregateXlocal_aX_capXaX
 Given the modern graph
 And using the parameter xx1 defined as "s[]"
 And the traversal of
-  """
-  g.withSideEffect("a", 
xx1).V().both().values("name").aggregate(Scope.local,"a").cap("a")
-  """
+"""
+g.withSideEffect("a", 
xx1).V().both().values("name").aggregate(Scope.local,"a").cap("a")
+"""
 When iterated next
 Then the result should be unordered
-  | result |
-  | marko |
-  | vadas |
-  | lop |
-  | josh |
-  | ripple |
-  | peter  |
+| result |
+| marko |
+| vadas |
+| lop |
+| josh |
+| ripple |
+| peter  |
 
   Scenario: 
g_V_aggregateXlocal_aX_byXoutEXcreatedX_countX_out_out_aggregateXlocal_aX_byXinEXcreatedX_weight_sumX
 Given the modern graph
 And the traversal of
-  """
-  g.V().aggregate(Scope.local,"a").
- by(__.outE("created").count()).
-out().out().aggregate(Scope.local,"a").
-  by(__.inE("created").values("weight").sum()).
-cap("a")
-  """
+"""
+g.V().aggregate(Scope.local,"a").
+by(__.outE("created").count()).
+out().out().aggregate(Scope.local,"a").
+by(__.inE("created").values("weight").sum()).
+cap("a")
+"""
 When iterated next
 Then the result should be unordered
-  | result |
-  | d[1].l |
-  | d[1].l |
-  | d[0].l |
-  | d[0].l |
-  | d[0].l |
-  | d[2].l |
-  | d[1.0].d |
-  | d[1.0].d |
+| result |
+| d[1].l |
+| d[1].l |
+| d[0].l |
+| d[0].l |
+| d[0].l |
+| d[2].l |
+| d[1.0].d |
+| d[1.0].d |
 
   Scenario: g_V_aggregateXxX_byXvaluesXageX_isXgtX29XXX_capXxX
 Given the modern graph
 And the traversal of
-  """
-  g.V().aggregate("x").by(__.values("age").is(P.gt(29))).cap("x")
-  """
+"""
+g.V().aggregate("x").by(__.values("age").is(P.gt(29))).cap("x")
+"""
 When iterated next
 Then the result should be unordered
-  | result |
-  | d[32].i |
-  | d[35].i |
+| result |
+| d[32].i |
+| d[35].i |
 
   @WithProductiveByStrategy
   Scenario: 
g_withStrategiesXProductiveByStrategyX_V_aggregateXxX_byXvaluesXageX_isXgtX29XXX_capXxX
 Given the modern graph
 And the traversal of
-  ""&quo

[jira] [Commented] (TINKERPOP-3105) Running 3.6.x python-driver with 3.7.x server leads to deserialization errors

2024-08-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3105:
---

vkagamlyk commented on PR #2742:
URL: https://github.com/apache/tinkerpop/pull/2742#issuecomment-2309048167

   VOTE+1




> Running 3.6.x python-driver with 3.7.x server leads to deserialization errors
> -
>
> Key: TINKERPOP-3105
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3105
> Project: TinkerPop
>  Issue Type: Bug
>  Components: io, python, server
>Affects Versions: 3.7.2
>Reporter: Yang Xia
>Priority: Blocker
>
> Running 3.6.x {{gremlin-python}} with 3.7.x {{gremlin-server}} leads to 
> serialization errors:
> {code:java}
> return self.deserializers[DataType(bt)].objectify(buff, self, nullable)
> KeyError: {code}
> with or without using {{ReferenceElementStrategy}} set on the server, 
> possibly due to a bug in how properties are being serialized and returned 
> from Java that is not inline with the specification. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3105) Running 3.6.x python-driver with 3.7.x server leads to deserialization errors

2024-08-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3105:
---

spmallette commented on PR #2742:
URL: https://github.com/apache/tinkerpop/pull/2742#issuecomment-2308823696

   Does GraphSON have these problems with 3.6.x drivers connecting to 3.7x 
servers? 




> Running 3.6.x python-driver with 3.7.x server leads to deserialization errors
> -
>
> Key: TINKERPOP-3105
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3105
> Project: TinkerPop
>  Issue Type: Bug
>  Components: io, python, server
>Affects Versions: 3.7.2
>Reporter: Yang Xia
>Priority: Blocker
>
> Running 3.6.x {{gremlin-python}} with 3.7.x {{gremlin-server}} leads to 
> serialization errors:
> {code:java}
> return self.deserializers[DataType(bt)].objectify(buff, self, nullable)
> KeyError: {code}
> with or without using {{ReferenceElementStrategy}} set on the server, 
> possibly due to a bug in how properties are being serialized and returned 
> from Java that is not inline with the specification. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3105) Running 3.6.x python-driver with 3.7.x server leads to deserialization errors

2024-08-23 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3105:
---

xiazcy commented on PR #2742:
URL: https://github.com/apache/tinkerpop/pull/2742#issuecomment-2307955217

   > Did you do the same check for VertexPropertySerializer or are 
metaproperties expected to be empty list instead of null.
   
   Yes, that's now also updated to write `null` instead of empty list as 
expected by older drivers. 




> Running 3.6.x python-driver with 3.7.x server leads to deserialization errors
> -
>
> Key: TINKERPOP-3105
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3105
> Project: TinkerPop
>  Issue Type: Bug
>  Components: io, python, server
>Affects Versions: 3.7.2
>Reporter: Yang Xia
>Priority: Blocker
>
> Running 3.6.x {{gremlin-python}} with 3.7.x {{gremlin-server}} leads to 
> serialization errors:
> {code:java}
> return self.deserializers[DataType(bt)].objectify(buff, self, nullable)
> KeyError: {code}
> with or without using {{ReferenceElementStrategy}} set on the server, 
> possibly due to a bug in how properties are being serialized and returned 
> from Java that is not inline with the specification. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3105) Running 3.6.x python-driver with 3.7.x server leads to deserialization errors

2024-08-23 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3105:
---

codecov-commenter commented on PR #2742:
URL: https://github.com/apache/tinkerpop/pull/2742#issuecomment-2307899615

   ## 
[Codecov](https://app.codecov.io/gh/apache/tinkerpop/pull/2742?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 80.44%. Comparing base 
[(`9b46b67`)](https://app.codecov.io/gh/apache/tinkerpop/commit/9b46b6777d2fa250e41daacf2fa4554605aff53a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 to head 
[(`55f7b73`)](https://app.codecov.io/gh/apache/tinkerpop/commit/55f7b735b302e7a5911ad5cb253e65fe19454489?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 185 commits behind head on 3.7-dev.
   
   Additional details and impacted files
   
   
   ```diff
   @@  Coverage Diff  @@
   ## 3.7-dev#2742  +/-   ##
   =
   + Coverage  76.14%   80.44%   +4.29% 
   =
 Files   1084   27-1057 
 Lines  65160 4985   -60175 
 Branches72850-7285 
   =
   - Hits   49616 4010   -45606 
   + Misses 12839  773   -12066 
   + Partials2705  202-2503 
   ```
   
   
   
   [:umbrella: View full report in Codecov by 
Sentry](https://app.codecov.io/gh/apache/tinkerpop/pull/2742?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   :loudspeaker: Have feedback on the report? [Share it 
here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   




> Running 3.6.x python-driver with 3.7.x server leads to deserialization errors
> -
>
> Key: TINKERPOP-3105
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3105
> Project: TinkerPop
>  Issue Type: Bug
>  Components: io, python, server
>Affects Versions: 3.7.2
>Reporter: Yang Xia
>Priority: Blocker
>
> Running 3.6.x {{gremlin-python}} with 3.7.x {{gremlin-server}} leads to 
> serialization errors:
> {code:java}
> return self.deserializers[DataType(bt)].objectify(buff, self, nullable)
> KeyError: {code}
> with or without using {{ReferenceElementStrategy}} set on the server, 
> possibly due to a bug in how properties are being serialized and returned 
> from Java that is not inline with the specification. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3105) Running 3.6.x python-driver with 3.7.x server leads to deserialization errors

2024-08-23 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3105:
---

kenhuuu commented on PR #2742:
URL: https://github.com/apache/tinkerpop/pull/2742#issuecomment-2307894833

   Did you do the same check for VertexPropertySerializer or are metaproperties 
expected to be empty list instead of null.




> Running 3.6.x python-driver with 3.7.x server leads to deserialization errors
> -
>
> Key: TINKERPOP-3105
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3105
> Project: TinkerPop
>  Issue Type: Bug
>  Components: io, python, server
>Affects Versions: 3.7.2
>Reporter: Yang Xia
>Priority: Blocker
>
> Running 3.6.x {{gremlin-python}} with 3.7.x {{gremlin-server}} leads to 
> serialization errors:
> {code:java}
> return self.deserializers[DataType(bt)].objectify(buff, self, nullable)
> KeyError: {code}
> with or without using {{ReferenceElementStrategy}} set on the server, 
> possibly due to a bug in how properties are being serialized and returned 
> from Java that is not inline with the specification. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3105) Running 3.6.x python-driver with 3.7.x server leads to deserialization errors

2024-08-23 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3105:
---

xiazcy opened a new pull request, #2742:
URL: https://github.com/apache/tinkerpop/pull/2742

   Currently, when skipping properties either via `tokens` or 
`ReferenceElementStrategy` with `GraphBinaryV1`, properties on element will 
return the default empty list, however drivers of older versions are expecting 
`null` properties for Reference Elements, as such serialization errors can 
occur in GLVs that does strict checking (i.e. `python` and `go`).
   
   This PR updated the check to ReferenceVertex/Edge as `value.properties() == 
null` won't be reached, and will write `null` for properties of Reference 
Elements in the GraphBinary serializer. 
   
   Also updated docs to make it more clear. 




> Running 3.6.x python-driver with 3.7.x server leads to deserialization errors
> -
>
> Key: TINKERPOP-3105
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3105
> Project: TinkerPop
>  Issue Type: Bug
>  Components: io, python, server
>Affects Versions: 3.7.2
>Reporter: Yang Xia
>Priority: Blocker
>
> Running 3.6.x {{gremlin-python}} with 3.7.x {{gremlin-server}} leads to 
> serialization errors:
> {code:java}
> return self.deserializers[DataType(bt)].objectify(buff, self, nullable)
> KeyError: {code}
> with or without using {{ReferenceElementStrategy}} set on the server, 
> possibly due to a bug in how properties are being serialized and returned 
> from Java that is not inline with the specification. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3083) The split() step should provide a way to split an entire string

2024-08-23 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3083:
---

Cole-Greer commented on PR #2741:
URL: https://github.com/apache/tinkerpop/pull/2741#issuecomment-2307836183

   Thanks @andreachild, looks great!
   
   VOTE +1




> The split() step should provide a way to split an entire string
> ---
>
> Key: TINKERPOP-3083
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3083
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language, process
>Affects Versions: 3.7.2
>Reporter: Kelvin Lawrence
>Priority: Critical
>
> There are many use cases where it is helpful to be able to split an entire 
> string into an array of characters. In other query languages, passing in a 
> null string ('') as the parameter achieves this. I believe the Gremlin step 
> should behave the same way. For example
> Current behavior
> {code:java}
> g.inject('Hello').split('')
> ['Hello']{code}
> Proposed new behavior
> {code:java}
> g.inject('Hello').split('')
> ['H','e','l','l','o']{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3083) The split() step should provide a way to split an entire string

2024-08-22 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3083:
---

andreachild commented on code in PR #2741:
URL: https://github.com/apache/tinkerpop/pull/2741#discussion_r1728012325


##
docs/src/dev/provider/gremlin-semantics.asciidoc:
##
@@ -1517,7 +1517,7 @@ 
link:https://tinkerpop.apache.org/docs/x.y.z/reference/#rTrim-step[reference]
 *Arguments:*
 
 * `separator` - The string character(s) used as delimiter to split the input 
string. Nullable, a null separator will split on
-whitespaces.
+whitespaces. An empty separator will split on each character.

Review Comment:
   Changed to 'empty string separator' for this file and also 
the-traversal.asciidoc.





> The split() step should provide a way to split an entire string
> ---
>
> Key: TINKERPOP-3083
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3083
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language, process
>Affects Versions: 3.7.2
>Reporter: Kelvin Lawrence
>Priority: Critical
>
> There are many use cases where it is helpful to be able to split an entire 
> string into an array of characters. In other query languages, passing in a 
> null string ('') as the parameter achieves this. I believe the Gremlin step 
> should behave the same way. For example
> Current behavior
> {code:java}
> g.inject('Hello').split('')
> ['Hello']{code}
> Proposed new behavior
> {code:java}
> g.inject('Hello').split('')
> ['H','e','l','l','o']{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3083) The split() step should provide a way to split an entire string

2024-08-22 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3083:
---

kenhuuu commented on code in PR #2741:
URL: https://github.com/apache/tinkerpop/pull/2741#discussion_r1727975407


##
docs/src/dev/provider/gremlin-semantics.asciidoc:
##
@@ -1517,7 +1517,7 @@ 
link:https://tinkerpop.apache.org/docs/x.y.z/reference/#rTrim-step[reference]
 *Arguments:*
 
 * `separator` - The string character(s) used as delimiter to split the input 
string. Nullable, a null separator will split on
-whitespaces.
+whitespaces. An empty separator will split on each character.

Review Comment:
   Minor nit: I think it should probably be "empty string separator"





> The split() step should provide a way to split an entire string
> ---
>
> Key: TINKERPOP-3083
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3083
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language, process
>Affects Versions: 3.7.2
>Reporter: Kelvin Lawrence
>Priority: Critical
>
> There are many use cases where it is helpful to be able to split an entire 
> string into an array of characters. In other query languages, passing in a 
> null string ('') as the parameter achieves this. I believe the Gremlin step 
> should behave the same way. For example
> Current behavior
> {code:java}
> g.inject('Hello').split('')
> ['Hello']{code}
> Proposed new behavior
> {code:java}
> g.inject('Hello').split('')
> ['H','e','l','l','o']{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3083) The split() step should provide a way to split an entire string

2024-08-22 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3083:
---

kenhuuu commented on PR #2741:
URL: https://github.com/apache/tinkerpop/pull/2741#issuecomment-2305829035

   Requires a CHANGELOG entry.
   
   VOTE +1 pending minor nits. Thanks for contributing.




> The split() step should provide a way to split an entire string
> ---
>
> Key: TINKERPOP-3083
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3083
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language, process
>Affects Versions: 3.7.2
>Reporter: Kelvin Lawrence
>Priority: Critical
>
> There are many use cases where it is helpful to be able to split an entire 
> string into an array of characters. In other query languages, passing in a 
> null string ('') as the parameter achieves this. I believe the Gremlin step 
> should behave the same way. For example
> Current behavior
> {code:java}
> g.inject('Hello').split('')
> ['Hello']{code}
> Proposed new behavior
> {code:java}
> g.inject('Hello').split('')
> ['H','e','l','l','o']{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3083) The split() step should provide a way to split an entire string

2024-08-22 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3083:
---

codecov-commenter commented on PR #2741:
URL: https://github.com/apache/tinkerpop/pull/2741#issuecomment-2305612001

   ## 
[Codecov](https://app.codecov.io/gh/apache/tinkerpop/pull/2741?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 80.38%. Comparing base 
[(`2d32517`)](https://app.codecov.io/gh/apache/tinkerpop/commit/2d32517b3bca1b00d716b3205c2abdbcd6ed3352?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 to head 
[(`297061c`)](https://app.codecov.io/gh/apache/tinkerpop/commit/297061cf072e475d0698b08891c197e50ea8841d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 270 commits behind head on master.
   
   Additional details and impacted files
   
   
   ```diff
   @@ Coverage Diff  @@
   ## master#2741  +/-   ##
   
   + Coverage 76.16%   80.38%   +4.22% 
   
 Files  1085   27-1058 
 Lines 65189 5017   -60172 
 Branches   72890-7289 
   
   - Hits  49651 4033   -45618 
   + Misses12830  781   -12049 
   + Partials   2708  203-2505 
   ```
   
   
   
   [:umbrella: View full report in Codecov by 
Sentry](https://app.codecov.io/gh/apache/tinkerpop/pull/2741?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   :loudspeaker: Have feedback on the report? [Share it 
here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   




> The split() step should provide a way to split an entire string
> ---
>
> Key: TINKERPOP-3083
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3083
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language, process
>Affects Versions: 3.7.2
>Reporter: Kelvin Lawrence
>Priority: Critical
>
> There are many use cases where it is helpful to be able to split an entire 
> string into an array of characters. In other query languages, passing in a 
> null string ('') as the parameter achieves this. I believe the Gremlin step 
> should behave the same way. For example
> Current behavior
> {code:java}
> g.inject('Hello').split('')
> ['Hello']{code}
> Proposed new behavior
> {code:java}
> g.inject('Hello').split('')
> ['H','e','l','l','o']{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3083) The split() step should provide a way to split an entire string

2024-08-22 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3083:
---

achild-improving opened a new pull request, #2741:
URL: https://github.com/apache/tinkerpop/pull/2741

   https://issues.apache.org/jira/browse/TINKERPOP-3083
   
   Change split() local and global steps to parse a string into individual 
characters if the separator is an empty string - previous implementation left 
the string intact. Introduced StringUtil utility class to reuse logic between 
the global and local step classes.




> The split() step should provide a way to split an entire string
> ---
>
> Key: TINKERPOP-3083
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3083
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language, process
>Affects Versions: 3.7.2
>Reporter: Kelvin Lawrence
>Priority: Critical
>
> There are many use cases where it is helpful to be able to split an entire 
> string into an array of characters. In other query languages, passing in a 
> null string ('') as the parameter achieves this. I believe the Gremlin step 
> should behave the same way. For example
> Current behavior
> {code:java}
> g.inject('Hello').split('')
> ['Hello']{code}
> Proposed new behavior
> {code:java}
> g.inject('Hello').split('')
> ['H','e','l','l','o']{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-2950) Dockerized server doesn't close gracefully

2024-08-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-2950:
---

danielcweber commented on PR #2397:
URL: https://github.com/apache/tinkerpop/pull/2397#issuecomment-2277638502

   @Cole-Greer If everything is fine, [here's a PR](#2712).




> Dockerized server doesn't close gracefully
> --
>
> Key: TINKERPOP-2950
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2950
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: server
>Affects Versions: 3.5.6, 3.6.4
>Reporter: Cole Greer
>Priority: Major
>
> When closing a docker container, docker sends a SIGTERM to the foreground 
> process of the container. Docker will then wait for all processes to 
> terminate. After a timeout (default 10s), if any processes haven't stopped, 
> docker will forcefully kill them.
> In our setup, docker-entrypoint.sh is the foreground process, so SIGTERM is 
> sent to this script when the container is closed. As this script does not 
> have any signal handlers, no signal is ever sent to the jvm running the 
> server (in a background process).
> The only workaround I'm aware of to gracefully shut down the server in docker 
> is to manually send a SIGINT to the jvm process as in:
> {code:bash}
> /opt/gremlin-server $ ps
> PID   USER TIME  COMMAND
> 1 gremlin   0:00 {gremlin-server.} /bin/bash 
> /opt/gremlin-server/bin/gremlin-server.sh conf/gremlin-server.yaml
>22 gremlin   0:06 java 
> -Dlogback.configurationFile=file:/opt/gremlin-server/conf/logback.xml 
> -Xms512m -Xmx4096m -cp :/opt/gremlin-server/conf/:/opt/gremlin-server/lib
>55 gremlin   0:00 /bin/sh
>61 gremlin   0:00 ps
> /opt/gremlin-server $ kill -INT 22 # PID of the java process (gremlin-server)
> {code}
> I propose that we add handlers to docker-entrypoint.sh which will forward 
> SIGTERM and SIGINT to the server process. The same issue likely applies to 
> gremlin-console as well although it is mitigated as the console has a built 
> in command to close itself.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-2950) Dockerized server doesn't close gracefully

2024-08-08 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-2950:
---

Cole-Greer commented on PR #2397:
URL: https://github.com/apache/tinkerpop/pull/2397#issuecomment-2276747905

   Thanks @danielcweber. I don't see anything that would break just from 
looking at the code. I will find some time to run some tests with it, if 
everything checks out I think we can merge that in.




> Dockerized server doesn't close gracefully
> --
>
> Key: TINKERPOP-2950
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2950
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: server
>Affects Versions: 3.5.6, 3.6.4
>Reporter: Cole Greer
>Priority: Major
>
> When closing a docker container, docker sends a SIGTERM to the foreground 
> process of the container. Docker will then wait for all processes to 
> terminate. After a timeout (default 10s), if any processes haven't stopped, 
> docker will forcefully kill them.
> In our setup, docker-entrypoint.sh is the foreground process, so SIGTERM is 
> sent to this script when the container is closed. As this script does not 
> have any signal handlers, no signal is ever sent to the jvm running the 
> server (in a background process).
> The only workaround I'm aware of to gracefully shut down the server in docker 
> is to manually send a SIGINT to the jvm process as in:
> {code:bash}
> /opt/gremlin-server $ ps
> PID   USER TIME  COMMAND
> 1 gremlin   0:00 {gremlin-server.} /bin/bash 
> /opt/gremlin-server/bin/gremlin-server.sh conf/gremlin-server.yaml
>22 gremlin   0:06 java 
> -Dlogback.configurationFile=file:/opt/gremlin-server/conf/logback.xml 
> -Xms512m -Xmx4096m -cp :/opt/gremlin-server/conf/:/opt/gremlin-server/lib
>55 gremlin   0:00 /bin/sh
>61 gremlin   0:00 ps
> /opt/gremlin-server $ kill -INT 22 # PID of the java process (gremlin-server)
> {code}
> I propose that we add handlers to docker-entrypoint.sh which will forward 
> SIGTERM and SIGINT to the server process. The same issue likely applies to 
> gremlin-console as well although it is mitigated as the console has a built 
> in command to close itself.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-2950) Dockerized server doesn't close gracefully

2024-08-08 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-2950:
---

danielcweber commented on PR #2397:
URL: https://github.com/apache/tinkerpop/pull/2397#issuecomment-2276473446

   @Cole-Greer My naive attempt that is working for me [would be this 
change](https://github.com/danielcweber/tinkerpop/commit/a02d15c9ea15a4a2c98dfe6d4d9c11d41eb9c1c4).
 This is not even PR quality because I don't know what this will break for 
other users. Basically, through this change, the 'java' process will end up as 
PID 1 and receive all the signals. 




> Dockerized server doesn't close gracefully
> --
>
> Key: TINKERPOP-2950
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2950
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: server
>Affects Versions: 3.5.6, 3.6.4
>Reporter: Cole Greer
>Priority: Major
>
> When closing a docker container, docker sends a SIGTERM to the foreground 
> process of the container. Docker will then wait for all processes to 
> terminate. After a timeout (default 10s), if any processes haven't stopped, 
> docker will forcefully kill them.
> In our setup, docker-entrypoint.sh is the foreground process, so SIGTERM is 
> sent to this script when the container is closed. As this script does not 
> have any signal handlers, no signal is ever sent to the jvm running the 
> server (in a background process).
> The only workaround I'm aware of to gracefully shut down the server in docker 
> is to manually send a SIGINT to the jvm process as in:
> {code:bash}
> /opt/gremlin-server $ ps
> PID   USER TIME  COMMAND
> 1 gremlin   0:00 {gremlin-server.} /bin/bash 
> /opt/gremlin-server/bin/gremlin-server.sh conf/gremlin-server.yaml
>22 gremlin   0:06 java 
> -Dlogback.configurationFile=file:/opt/gremlin-server/conf/logback.xml 
> -Xms512m -Xmx4096m -cp :/opt/gremlin-server/conf/:/opt/gremlin-server/lib
>55 gremlin   0:00 /bin/sh
>61 gremlin   0:00 ps
> /opt/gremlin-server $ kill -INT 22 # PID of the java process (gremlin-server)
> {code}
> I propose that we add handlers to docker-entrypoint.sh which will forward 
> SIGTERM and SIGINT to the server process. The same issue likely applies to 
> gremlin-console as well although it is mitigated as the console has a built 
> in command to close itself.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-2950) Dockerized server doesn't close gracefully

2024-08-08 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-2950:
---

danielcweber commented on PR #2397:
URL: https://github.com/apache/tinkerpop/pull/2397#issuecomment-2276264367

   I'm basically clueless about bash files but I'll give it a try nonetheless.




> Dockerized server doesn't close gracefully
> --
>
> Key: TINKERPOP-2950
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2950
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: server
>Affects Versions: 3.5.6, 3.6.4
>Reporter: Cole Greer
>Priority: Major
>
> When closing a docker container, docker sends a SIGTERM to the foreground 
> process of the container. Docker will then wait for all processes to 
> terminate. After a timeout (default 10s), if any processes haven't stopped, 
> docker will forcefully kill them.
> In our setup, docker-entrypoint.sh is the foreground process, so SIGTERM is 
> sent to this script when the container is closed. As this script does not 
> have any signal handlers, no signal is ever sent to the jvm running the 
> server (in a background process).
> The only workaround I'm aware of to gracefully shut down the server in docker 
> is to manually send a SIGINT to the jvm process as in:
> {code:bash}
> /opt/gremlin-server $ ps
> PID   USER TIME  COMMAND
> 1 gremlin   0:00 {gremlin-server.} /bin/bash 
> /opt/gremlin-server/bin/gremlin-server.sh conf/gremlin-server.yaml
>22 gremlin   0:06 java 
> -Dlogback.configurationFile=file:/opt/gremlin-server/conf/logback.xml 
> -Xms512m -Xmx4096m -cp :/opt/gremlin-server/conf/:/opt/gremlin-server/lib
>55 gremlin   0:00 /bin/sh
>61 gremlin   0:00 ps
> /opt/gremlin-server $ kill -INT 22 # PID of the java process (gremlin-server)
> {code}
> I propose that we add handlers to docker-entrypoint.sh which will forward 
> SIGTERM and SIGINT to the server process. The same issue likely applies to 
> gremlin-console as well although it is mitigated as the console has a built 
> in command to close itself.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-2950) Dockerized server doesn't close gracefully

2024-08-07 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-2950:
---

Cole-Greer commented on PR #2397:
URL: https://github.com/apache/tinkerpop/pull/2397#issuecomment-2274153041

   I'm seeing the same behaviour as well now. The change here is preventing 
docker from hanging due to `/opt/gremlin-server/bin/gremlin-server.sh` not 
terminating, but it does not properly terminate the gremlin server JVM process.
   
   @danielcweber As you've already dug into this, would you be willing to 
submit a PR with a fix? If not let's reopen the JIRA for tracking and ensure it 
gets fixed for the next release.




> Dockerized server doesn't close gracefully
> --
>
> Key: TINKERPOP-2950
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2950
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: server
>Affects Versions: 3.5.6, 3.6.4
>Reporter: Cole Greer
>Priority: Major
>
> When closing a docker container, docker sends a SIGTERM to the foreground 
> process of the container. Docker will then wait for all processes to 
> terminate. After a timeout (default 10s), if any processes haven't stopped, 
> docker will forcefully kill them.
> In our setup, docker-entrypoint.sh is the foreground process, so SIGTERM is 
> sent to this script when the container is closed. As this script does not 
> have any signal handlers, no signal is ever sent to the jvm running the 
> server (in a background process).
> The only workaround I'm aware of to gracefully shut down the server in docker 
> is to manually send a SIGINT to the jvm process as in:
> {code:bash}
> /opt/gremlin-server $ ps
> PID   USER TIME  COMMAND
> 1 gremlin   0:00 {gremlin-server.} /bin/bash 
> /opt/gremlin-server/bin/gremlin-server.sh conf/gremlin-server.yaml
>22 gremlin   0:06 java 
> -Dlogback.configurationFile=file:/opt/gremlin-server/conf/logback.xml 
> -Xms512m -Xmx4096m -cp :/opt/gremlin-server/conf/:/opt/gremlin-server/lib
>55 gremlin   0:00 /bin/sh
>61 gremlin   0:00 ps
> /opt/gremlin-server $ kill -INT 22 # PID of the java process (gremlin-server)
> {code}
> I propose that we add handlers to docker-entrypoint.sh which will forward 
> SIGTERM and SIGINT to the server process. The same issue likely applies to 
> gremlin-console as well although it is mitigated as the console has a built 
> in command to close itself.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-2950) Dockerized server doesn't close gracefully

2024-08-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-2950:
---

danielcweber commented on PR #2397:
URL: https://github.com/apache/tinkerpop/pull/2397#issuecomment-2270998629

   This is an issue for me as well. It seems that docker-entrypoint.sh forwards 
SIGTERMS as SIGINTS to /opt/gremlin-server/bin/gremlin-server.sh but it's 
ignored there. What needs to be sent the signal instead is the java process 
that gremlin-server.sh starts.




> Dockerized server doesn't close gracefully
> --
>
> Key: TINKERPOP-2950
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2950
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: server
>Affects Versions: 3.5.6, 3.6.4
>Reporter: Cole Greer
>Priority: Major
>
> When closing a docker container, docker sends a SIGTERM to the foreground 
> process of the container. Docker will then wait for all processes to 
> terminate. After a timeout (default 10s), if any processes haven't stopped, 
> docker will forcefully kill them.
> In our setup, docker-entrypoint.sh is the foreground process, so SIGTERM is 
> sent to this script when the container is closed. As this script does not 
> have any signal handlers, no signal is ever sent to the jvm running the 
> server (in a background process).
> The only workaround I'm aware of to gracefully shut down the server in docker 
> is to manually send a SIGINT to the jvm process as in:
> {code:bash}
> /opt/gremlin-server $ ps
> PID   USER TIME  COMMAND
> 1 gremlin   0:00 {gremlin-server.} /bin/bash 
> /opt/gremlin-server/bin/gremlin-server.sh conf/gremlin-server.yaml
>22 gremlin   0:06 java 
> -Dlogback.configurationFile=file:/opt/gremlin-server/conf/logback.xml 
> -Xms512m -Xmx4096m -cp :/opt/gremlin-server/conf/:/opt/gremlin-server/lib
>55 gremlin   0:00 /bin/sh
>61 gremlin   0:00 ps
> /opt/gremlin-server $ kill -INT 22 # PID of the java process (gremlin-server)
> {code}
> I propose that we add handlers to docker-entrypoint.sh which will forward 
> SIGTERM and SIGINT to the server process. The same issue likely applies to 
> gremlin-console as well although it is mitigated as the console has a built 
> in command to close itself.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-2950) Dockerized server doesn't close gracefully

2024-08-05 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-2950:
---

rcbyron commented on PR #2397:
URL: https://github.com/apache/tinkerpop/pull/2397#issuecomment-2270026800

   I'm still having issues with graceful shutdown even with this code.
   
   I use the default scripts/empty-sample.groovy which has:
   ```groovy
   globals << [hook : [
   onStartUp: { LifeCycleHook.Context ctx ->
   ctx.logger.info("Executed once at startup of Gremlin Server.")
   },
   onShutDown: { LifeCycleHook.Context ctx ->
   ctx.logger.info("Executed once at shutdown of Gremlin Server.")
   graph.close()  // <

> Dockerized server doesn't close gracefully
> --
>
> Key: TINKERPOP-2950
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2950
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: server
>Affects Versions: 3.5.6, 3.6.4
>Reporter: Cole Greer
>Priority: Major
>
> When closing a docker container, docker sends a SIGTERM to the foreground 
> process of the container. Docker will then wait for all processes to 
> terminate. After a timeout (default 10s), if any processes haven't stopped, 
> docker will forcefully kill them.
> In our setup, docker-entrypoint.sh is the foreground process, so SIGTERM is 
> sent to this script when the container is closed. As this script does not 
> have any signal handlers, no signal is ever sent to the jvm running the 
> server (in a background process).
> The only workaround I'm aware of to gracefully shut down the server in docker 
> is to manually send a SIGINT to the jvm process as in:
> {code:bash}
> /opt/gremlin-server $ ps
> PID   USER TIME  COMMAND
> 1 gremlin   0:00 {gremlin-server.} /bin/bash 
> /opt/gremlin-server/bin/gremlin-server.sh conf/gremlin-server.yaml
>22 gremlin   0:06 java 
> -Dlogback.configurationFile=file:/opt/gremlin-server/conf/logback.xml 
> -Xms512m -Xmx4096m -cp :/opt/gremlin-server/conf/:/opt/gremlin-server/lib
>55 gremlin   0:00 /bin/sh
>61 gremlin   0:00 ps
> /opt/gremlin-server $ kill -INT 22 # PID of the java process (gremlin-server)
> {code}
> I propose that we add handlers to docker-entrypoint.sh which will forward 
> SIGTERM and SIGINT to the server process. The same issue likely applies to 
> gremlin-console as well although it is mitigated as the console has a built 
> in command to close itself.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3098) Gremlin Console bat file is missing log level configuration option

2024-07-23 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3098:
---

vkagamlyk merged PR #2694:
URL: https://github.com/apache/tinkerpop/pull/2694




> Gremlin Console bat file is missing log level configuration option
> --
>
> Key: TINKERPOP-3098
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3098
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: console
>Affects Versions: 3.6.7, 3.7.2
>Reporter: Yang Xia
>Priority: Critical
>
> The bat file for Gremlin Console does not have an option for log level like 
> the bash file. It causes excessing logging output by default. 
> The bat file should be updated to enable log level options. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3098) Gremlin Console bat file is missing log level configuration option

2024-07-23 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3098:
---

vkagamlyk commented on PR #2694:
URL: https://github.com/apache/tinkerpop/pull/2694#issuecomment-2246442399

   VOTE+1




> Gremlin Console bat file is missing log level configuration option
> --
>
> Key: TINKERPOP-3098
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3098
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: console
>Affects Versions: 3.6.7, 3.7.2
>Reporter: Yang Xia
>Priority: Critical
>
> The bat file for Gremlin Console does not have an option for log level like 
> the bash file. It causes excessing logging output by default. 
> The bat file should be updated to enable log level options. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3098) Gremlin Console bat file is missing log level configuration option

2024-07-23 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3098:
---

Cole-Greer commented on PR #2694:
URL: https://github.com/apache/tinkerpop/pull/2694#issuecomment-2246334753

   VOTE +1




> Gremlin Console bat file is missing log level configuration option
> --
>
> Key: TINKERPOP-3098
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3098
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: console
>Affects Versions: 3.6.7, 3.7.2
>Reporter: Yang Xia
>Priority: Critical
>
> The bat file for Gremlin Console does not have an option for log level like 
> the bash file. It causes excessing logging output by default. 
> The bat file should be updated to enable log level options. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3098) Gremlin Console bat file is missing log level configuration option

2024-07-22 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3098:
---

xiazcy commented on PR #2694:
URL: https://github.com/apache/tinkerpop/pull/2694#issuecomment-2243817827

   VOTE +1




> Gremlin Console bat file is missing log level configuration option
> --
>
> Key: TINKERPOP-3098
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3098
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: console
>Affects Versions: 3.6.7, 3.7.2
>Reporter: Yang Xia
>Priority: Critical
>
> The bat file for Gremlin Console does not have an option for log level like 
> the bash file. It causes excessing logging output by default. 
> The bat file should be updated to enable log level options. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3096) Missing necessary parameters for logging, resulting in '%!x(MISSING)' in output

2024-07-17 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3096:
---

xiazcy merged PR #2684:
URL: https://github.com/apache/tinkerpop/pull/2684




> Missing necessary parameters for logging, resulting in '%!x(MISSING)' in 
> output
> ---
>
> Key: TINKERPOP-3096
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3096
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: go
>Affects Versions: 3.7.2
>Reporter: thomas-dg
>Priority: Trivial
>
> I encountered a log message missing necessary parameters while using the 
> 'Containing' function. The detailed log information is as follows:
> {code:java}
> // code placeholder
> 2024/07/14 16:27:28 Error occurred during operation 
> gremlinServerWSProtocol.readLoop(): 'E0703: expected string Key for map, got 
> type='0x%!x(MISSING)''
> 2024/07/14 16:27:28 Read loop error 'E0703: expected string Key for map, got 
> type='0x%!x(MISSING)'', closing read loop.
> 2024/07/14 16:27:28 Connection error callback invoked, closing protocol. 
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3096) Missing necessary parameters for logging, resulting in '%!x(MISSING)' in output

2024-07-17 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3096:
---

codecov-commenter commented on PR #2684:
URL: https://github.com/apache/tinkerpop/pull/2684#issuecomment-2233900455

   ## 
[Codecov](https://app.codecov.io/gh/apache/tinkerpop/pull/2684?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 80.44%. Comparing base 
[(`9b46b67`)](https://app.codecov.io/gh/apache/tinkerpop/commit/9b46b6777d2fa250e41daacf2fa4554605aff53a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 to head 
[(`71207b6`)](https://app.codecov.io/gh/apache/tinkerpop/commit/71207b6833cf3eb0db99c6cec7af9fcc575e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 174 commits behind head on 3.7-dev.
   
   Additional details and impacted files
   
   
   ```diff
   @@  Coverage Diff  @@
   ## 3.7-dev#2684  +/-   ##
   =
   + Coverage  76.14%   80.44%   +4.29% 
   =
 Files   1084   27-1057 
 Lines  65160 4985   -60175 
 Branches72850-7285 
   =
   - Hits   49616 4010   -45606 
   + Misses 12839  773   -12066 
   + Partials2705  202-2503 
   ```
   
   
   
   [:umbrella: View full report in Codecov by 
Sentry](https://app.codecov.io/gh/apache/tinkerpop/pull/2684?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   :loudspeaker: Have feedback on the report? [Share it 
here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   




> Missing necessary parameters for logging, resulting in '%!x(MISSING)' in 
> output
> ---
>
> Key: TINKERPOP-3096
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3096
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: go
>Affects Versions: 3.7.2
>Reporter: thomas-dg
>Priority: Trivial
>
> I encountered a log message missing necessary parameters while using the 
> 'Containing' function. The detailed log information is as follows:
> {code:java}
> // code placeholder
> 2024/07/14 16:27:28 Error occurred during operation 
> gremlinServerWSProtocol.readLoop(): 'E0703: expected string Key for map, got 
> type='0x%!x(MISSING)''
> 2024/07/14 16:27:28 Read loop error 'E0703: expected string Key for map, got 
> type='0x%!x(MISSING)'', closing read loop.
> 2024/07/14 16:27:28 Connection error callback invoked, closing protocol. 
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3096) Missing necessary parameters for logging, resulting in '%!x(MISSING)' in output

2024-07-17 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3096:
---

xiazcy commented on PR #2684:
URL: https://github.com/apache/tinkerpop/pull/2684#issuecomment-2233868228

   Given this is a small change, I'll be merging this as CTR after the actions 
pass. 




> Missing necessary parameters for logging, resulting in '%!x(MISSING)' in 
> output
> ---
>
> Key: TINKERPOP-3096
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3096
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: go
>Affects Versions: 3.7.2
>Reporter: thomas-dg
>Priority: Trivial
>
> I encountered a log message missing necessary parameters while using the 
> 'Containing' function. The detailed log information is as follows:
> {code:java}
> // code placeholder
> 2024/07/14 16:27:28 Error occurred during operation 
> gremlinServerWSProtocol.readLoop(): 'E0703: expected string Key for map, got 
> type='0x%!x(MISSING)''
> 2024/07/14 16:27:28 Read loop error 'E0703: expected string Key for map, got 
> type='0x%!x(MISSING)'', closing read loop.
> 2024/07/14 16:27:28 Connection error callback invoked, closing protocol. 
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3096) Missing necessary parameters for logging, resulting in '%!x(MISSING)' in output

2024-07-16 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3096:
---

xiazcy commented on PR #2684:
URL: https://github.com/apache/tinkerpop/pull/2684#issuecomment-2231706679

   VOTE +1, thanks for fixing the bug!




> Missing necessary parameters for logging, resulting in '%!x(MISSING)' in 
> output
> ---
>
> Key: TINKERPOP-3096
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3096
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: go
>Affects Versions: 3.7.2
>Reporter: thomas-dg
>Priority: Trivial
>
> I encountered a log message missing necessary parameters while using the 
> 'Containing' function. The detailed log information is as follows:
> {code:java}
> // code placeholder
> 2024/07/14 16:27:28 Error occurred during operation 
> gremlinServerWSProtocol.readLoop(): 'E0703: expected string Key for map, got 
> type='0x%!x(MISSING)''
> 2024/07/14 16:27:28 Read loop error 'E0703: expected string Key for map, got 
> type='0x%!x(MISSING)'', closing read loop.
> 2024/07/14 16:27:28 Connection error callback invoked, closing protocol. 
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3096) Missing necessary parameters for logging, resulting in '%!x(MISSING)' in output

2024-07-15 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3096:
---

thomas-dg opened a new pull request, #2684:
URL: https://github.com/apache/tinkerpop/pull/2684

   
   
   https://issues.apache.org/jira/browse/TINKERPOP-3096
   
   I encountered a log message missing necessary parameters while using the 
'Containing' function. The detailed log information is as follows:
   
   `2024/07/14 16:27:28 Error occurred during operation 
gremlinServerWSProtocol.readLoop(): 'E0703: expected string Key for map, got 
type='0x%!x(MISSING)''
   2024/07/14 16:27:28 Read loop error 'E0703: expected string Key for map, got 
type='0x%!x(MISSING)'', closing read loop.
   2024/07/14 16:27:28 Connection error callback invoked, closing protocol. `
   
   
   




> Missing necessary parameters for logging, resulting in '%!x(MISSING)' in 
> output
> ---
>
> Key: TINKERPOP-3096
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3096
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: go
>Affects Versions: 3.7.2
>Reporter: thomas-dg
>Priority: Trivial
>
> I encountered a log message missing necessary parameters while using the 
> 'Containing' function. The detailed log information is as follows:
> {code:java}
> // code placeholder
> 2024/07/14 16:27:28 Error occurred during operation 
> gremlinServerWSProtocol.readLoop(): 'E0703: expected string Key for map, got 
> type='0x%!x(MISSING)''
> 2024/07/14 16:27:28 Read loop error 'E0703: expected string Key for map, got 
> type='0x%!x(MISSING)'', closing read loop.
> 2024/07/14 16:27:28 Connection error callback invoked, closing protocol. 
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3081) When using authentication, evaluationTimeout is ignored

2024-07-04 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3081:
---

kenhuuu merged PR #2622:
URL: https://github.com/apache/tinkerpop/pull/2622




> When using authentication, evaluationTimeout is ignored
> ---
>
> Key: TINKERPOP-3081
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3081
> Project: TinkerPop
>  Issue Type: Bug
>Reporter: Lyndon Bauto
>Assignee: Lyndon Bauto
>Priority: Major
>
> Using g.with("evaluationTimeout"). ignored evaluationTimeout when 
> authentication is enabled.
>  
> Relevant discord thread: 
> https://discord.com/channels/838910279550238720/1245462911728615629/1245462911728615629



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3081) When using authentication, evaluationTimeout is ignored

2024-07-04 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3081:
---

lyndonbauto commented on PR #2622:
URL: https://github.com/apache/tinkerpop/pull/2622#issuecomment-2209416216

   @kenhuuu go ahead and merge it, sorry I am caught up in some stuff right now




> When using authentication, evaluationTimeout is ignored
> ---
>
> Key: TINKERPOP-3081
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3081
> Project: TinkerPop
>  Issue Type: Bug
>Reporter: Lyndon Bauto
>Assignee: Lyndon Bauto
>Priority: Major
>
> Using g.with("evaluationTimeout"). ignored evaluationTimeout when 
> authentication is enabled.
>  
> Relevant discord thread: 
> https://discord.com/channels/838910279550238720/1245462911728615629/1245462911728615629



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3081) When using authentication, evaluationTimeout is ignored

2024-07-02 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3081:
---

kenhuuu commented on PR #2622:
URL: https://github.com/apache/tinkerpop/pull/2622#issuecomment-2204636803

   Hi Lyndon, were you planning on merging this? If not, I can help you merge 
it this week. I'd prefer not to leave this PR hanging around since it might 
cause conflicts with other PRs (the CHANGELOG, in particular, usually causes 
conflicts).




> When using authentication, evaluationTimeout is ignored
> ---
>
> Key: TINKERPOP-3081
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3081
> Project: TinkerPop
>  Issue Type: Bug
>Reporter: Lyndon Bauto
>Assignee: Lyndon Bauto
>Priority: Major
>
> Using g.with("evaluationTimeout"). ignored evaluationTimeout when 
> authentication is enabled.
>  
> Relevant discord thread: 
> https://discord.com/channels/838910279550238720/1245462911728615629/1245462911728615629



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3089) min() and max() local forms not working properly with empty iterator input

2024-07-02 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3089:
---

spmallette commented on PR #2665:
URL: https://github.com/apache/tinkerpop/pull/2665#issuecomment-2191555913

   VOTE +1




> min() and max() local forms not working properly with empty iterator input
> --
>
> Key: TINKERPOP-3089
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3089
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.7.2
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Critical
> Fix For: 4.0.0, 3.7.3
>
>
> {code}
> gremlin> g.V().local(union(values("age"), outE().values("weight")).fold())
> ==>[29,0.4,0.5,1.0]
> ==>[27]
> ==>[]
> ==>[32,1.0,0.4]
> ==>[]
> ==>[35,0.2]
> gremlin> g.V().local(union(values("age"), 
> outE().values("weight")).fold()).max(local)
> ==>29.0
> ==>27
> {code}
> Encounters the first empty list and then stops.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3081) When using authentication, evaluationTimeout is ignored

2024-06-18 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3081:
---

lyndonbauto commented on PR #2622:
URL: https://github.com/apache/tinkerpop/pull/2622#issuecomment-2176847347

   @xiazcy I tried something else, hopefully it works :pray: 




> When using authentication, evaluationTimeout is ignored
> ---
>
> Key: TINKERPOP-3081
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3081
> Project: TinkerPop
>  Issue Type: Bug
>Reporter: Lyndon Bauto
>Assignee: Lyndon Bauto
>Priority: Major
>
> Using g.with("evaluationTimeout"). ignored evaluationTimeout when 
> authentication is enabled.
>  
> Relevant discord thread: 
> https://discord.com/channels/838910279550238720/1245462911728615629/1245462911728615629



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3081) When using authentication, evaluationTimeout is ignored

2024-06-18 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3081:
---

lyndonbauto commented on PR #2622:
URL: https://github.com/apache/tinkerpop/pull/2622#issuecomment-2176823755

   @xiazcy Yeah its wrong right now, I need to do it a different way, I wasn't 
able to test locally due to jvm installation mismatches so I tried that 
blindly. I'll try to see if I can do it a different way.




> When using authentication, evaluationTimeout is ignored
> ---
>
> Key: TINKERPOP-3081
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3081
> Project: TinkerPop
>  Issue Type: Bug
>Reporter: Lyndon Bauto
>Assignee: Lyndon Bauto
>Priority: Major
>
> Using g.with("evaluationTimeout"). ignored evaluationTimeout when 
> authentication is enabled.
>  
> Relevant discord thread: 
> https://discord.com/channels/838910279550238720/1245462911728615629/1245462911728615629



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3081) When using authentication, evaluationTimeout is ignored

2024-06-18 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3081:
---

xiazcy commented on PR #2622:
URL: https://github.com/apache/tinkerpop/pull/2622#issuecomment-2176809853

   Could you check your test set up? It seems like there is a serialization 
error with it. 
   `org.apache.tinkerpop.gremlin.driver.ser.SerializationException: 
java.io.IOException: Serializer for type 
org.apache.tinkerpop.gremlin.server.GremlinServerAuthzIntegrateTest$$Lambda$597/0x00080074d840
 not found`




> When using authentication, evaluationTimeout is ignored
> ---
>
> Key: TINKERPOP-3081
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3081
> Project: TinkerPop
>  Issue Type: Bug
>Reporter: Lyndon Bauto
>Assignee: Lyndon Bauto
>Priority: Major
>
> Using g.with("evaluationTimeout"). ignored evaluationTimeout when 
> authentication is enabled.
>  
> Relevant discord thread: 
> https://discord.com/channels/838910279550238720/1245462911728615629/1245462911728615629



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3080) AggregateStep can support all Operators predefined in TinkerPop

2024-06-17 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3080:
---

rdtr commented on code in PR #2616:
URL: https://github.com/apache/tinkerpop/pull/2616#discussion_r1643211595


##
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AggregateGlobalStep.java:
##
@@ -122,8 +121,16 @@ protected Traverser.Admin processNextStart() {
 
 @Override
 public void processAllStarts() {
+final TraversalSideEffects sideEffects = 
this.getTraversal().getSideEffects();
+
+// Pre-defined Operator such as addAll and assign will reduce over the 
whole input set, rather than
+// applying a single input one by one.

Review Comment:
   Changed the comment, please take a look





> AggregateStep can support all Operators predefined in TinkerPop
> ---
>
> Key: TINKERPOP-3080
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3080
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language, process
>Reporter: Norio Akagi
>Priority: Major
> Fix For: 3.7.3
>
>
> Currently, {{AggreteGlobalStep}} and {{AggreteLocalStep}} only support addAll 
> and assign as Operator. This is because they use BulkSet to apply to 
> Operator. Only addAll and assign can work with BulkSet, so for other 
> operators it results in a type casting failure.
> They can be more flexible to work with any operators depending on what is set 
> by {{{}withSideEffect(){}}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3080) AggregateStep can support all Operators predefined in TinkerPop

2024-06-17 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3080:
---

rdtr commented on code in PR #2616:
URL: https://github.com/apache/tinkerpop/pull/2616#discussion_r1643189640


##
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java:
##
@@ -80,6 +78,13 @@ public void apply(final Traversal.Admin traversal) {
 
 if (UNSUPPORTED_STEPS.stream().filter(c -> 
c.isAssignableFrom(step.getClass())).findFirst().isPresent())
 throw new VerificationException("The following step is 
currently not supported on GraphComputer: " + step, traversal);
+
+if (step instanceof SideEffectCapable) {
+final BinaryOperator sideEffectOperator = 
traversal.getSideEffects().getReducer(((SideEffectCapable) 
step).getSideEffectKey());
+if (sideEffectOperator instanceof Operator && (!((Operator) 
sideEffectOperator).isCommutative())) {
+throw new VerificationException("The following step has an 
SideEffect operator " + sideEffectOperator + " which is currently not supported 
on GraphComputer: " + step, traversal);
+}
+}

Review Comment:
   Without this, in GraphComputer test I see that the unit tests I added 
failed. It seems GraphComputer works like map-reduce so when we have input like 
`1,2,3,4,5,6` for example, they are split into small chunk and operator is 
applied. 
   
   So for example, let's say we have 3 hosts and data are split like `1, 6`, 
`2, 4`, and `3, 5`. With `ADD` it is fine because on each host the result would 
be `7`, `6`, and `8`. They are further summed up to 7 + 6 + 8 = 21 so the 
result is consistent.
   However, for `MINUS`, a result in each host would be `-5`, `-2`, and `-2` 
then -5 - (-2) - (-2) = -1. This is not what we want because what we expect to 
happen is 1 - 2 - 3 - 4 - 5 - 6. 
   
   I believe that we can still make it to work in distributed env with some 
tweak, but Stephen agreed to disable it for now.





> AggregateStep can support all Operators predefined in TinkerPop
> ---
>
> Key: TINKERPOP-3080
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3080
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language, process
>Reporter: Norio Akagi
>Priority: Major
> Fix For: 3.7.3
>
>
> Currently, {{AggreteGlobalStep}} and {{AggreteLocalStep}} only support addAll 
> and assign as Operator. This is because they use BulkSet to apply to 
> Operator. Only addAll and assign can work with BulkSet, so for other 
> operators it results in a type casting failure.
> They can be more flexible to work with any operators depending on what is set 
> by {{{}withSideEffect(){}}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3080) AggregateStep can support all Operators predefined in TinkerPop

2024-06-17 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3080:
---

rdtr commented on code in PR #2616:
URL: https://github.com/apache/tinkerpop/pull/2616#discussion_r1643180225


##
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AggregateGlobalStep.java:
##
@@ -122,8 +121,16 @@ protected Traverser.Admin processNextStart() {
 
 @Override
 public void processAllStarts() {
+final TraversalSideEffects sideEffects = 
this.getTraversal().getSideEffects();
+
+// Pre-defined Operator such as addAll and assign will reduce over the 
whole input set, rather than
+// applying a single input one by one.
+final boolean isOperatorForBulkSet = 
sideEffects.getReducer(sideEffectKey) == Operator.addAll ||

Review Comment:
   thanks, renamed it





> AggregateStep can support all Operators predefined in TinkerPop
> ---
>
> Key: TINKERPOP-3080
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3080
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language, process
>Reporter: Norio Akagi
>Priority: Major
> Fix For: 3.7.3
>
>
> Currently, {{AggreteGlobalStep}} and {{AggreteLocalStep}} only support addAll 
> and assign as Operator. This is because they use BulkSet to apply to 
> Operator. Only addAll and assign can work with BulkSet, so for other 
> operators it results in a type casting failure.
> They can be more flexible to work with any operators depending on what is set 
> by {{{}withSideEffect(){}}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3081) When using authentication, evaluationTimeout is ignored

2024-06-17 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3081:
---

kenhuuu commented on PR #2622:
URL: https://github.com/apache/tinkerpop/pull/2622#issuecomment-2173915677

   VOTE +1




> When using authentication, evaluationTimeout is ignored
> ---
>
> Key: TINKERPOP-3081
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3081
> Project: TinkerPop
>  Issue Type: Bug
>Reporter: Lyndon Bauto
>Assignee: Lyndon Bauto
>Priority: Major
>
> Using g.with("evaluationTimeout"). ignored evaluationTimeout when 
> authentication is enabled.
>  
> Relevant discord thread: 
> https://discord.com/channels/838910279550238720/1245462911728615629/1245462911728615629



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3081) When using authentication, evaluationTimeout is ignored

2024-06-12 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3081:
---

lyndonbauto commented on PR #2622:
URL: https://github.com/apache/tinkerpop/pull/2622#issuecomment-2163659163

   @kenhuuu okay will do, might be a bit im just wrappedu p in some other stuff 
with work but this is in the back of my mind.




> When using authentication, evaluationTimeout is ignored
> ---
>
> Key: TINKERPOP-3081
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3081
> Project: TinkerPop
>  Issue Type: Bug
>Reporter: Lyndon Bauto
>Assignee: Lyndon Bauto
>Priority: Major
>
> Using g.with("evaluationTimeout"). ignored evaluationTimeout when 
> authentication is enabled.
>  
> Relevant discord thread: 
> https://discord.com/channels/838910279550238720/1245462911728615629/1245462911728615629



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3081) When using authentication, evaluationTimeout is ignored

2024-06-10 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3081:
---

kenhuuu commented on PR #2622:
URL: https://github.com/apache/tinkerpop/pull/2622#issuecomment-2159466598

   Might be good to also add an integration test for this. Probably here 
https://github.com/apache/tinkerpop/blob/3.6-dev/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthzIntegrateTest.java




> When using authentication, evaluationTimeout is ignored
> ---
>
> Key: TINKERPOP-3081
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3081
> Project: TinkerPop
>  Issue Type: Bug
>Reporter: Lyndon Bauto
>Assignee: Lyndon Bauto
>Priority: Major
>
> Using g.with("evaluationTimeout"). ignored evaluationTimeout when 
> authentication is enabled.
>  
> Relevant discord thread: 
> https://discord.com/channels/838910279550238720/1245462911728615629/1245462911728615629



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3081) When using authentication, evaluationTimeout is ignored

2024-06-10 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3081:
---

lyndonbauto commented on code in PR #2622:
URL: https://github.com/apache/tinkerpop/pull/2622#discussion_r1633738812


##
gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WebSocketAuthorizationHandler.java:
##
@@ -68,11 +68,19 @@ public void channelRead(final ChannelHandlerContext ctx, 
final Object msg) {
 final Bytecode bytecode = (Bytecode) 
requestMessage.getArgs().get(Tokens.ARGS_GREMLIN);
 final Map aliases = (Map) requestMessage.getArgs().get(Tokens.ARGS_ALIASES);
 final Bytecode restrictedBytecode = 
authorizer.authorize(user, bytecode, aliases);
-final RequestMessage restrictedMsg = 
RequestMessage.build(Tokens.OPS_BYTECODE).
+final RequestMessage.Builder restrictedMsgBuilder = 
RequestMessage.build(Tokens.OPS_BYTECODE).

Review Comment:
   Updated





> When using authentication, evaluationTimeout is ignored
> ---
>
> Key: TINKERPOP-3081
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3081
> Project: TinkerPop
>  Issue Type: Bug
>Reporter: Lyndon Bauto
>Assignee: Lyndon Bauto
>Priority: Major
>
> Using g.with("evaluationTimeout"). ignored evaluationTimeout when 
> authentication is enabled.
>  
> Relevant discord thread: 
> https://discord.com/channels/838910279550238720/1245462911728615629/1245462911728615629



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3060) Dependency inconsistency between modules.

2024-06-10 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3060:
---

xiazcy closed pull request #2546: [TINKERPOP-3060] Manage the versions of 
snappy-java and jackson-* centrally to avoid version conflict.
URL: https://github.com/apache/tinkerpop/pull/2546




> Dependency inconsistency between modules.
> -
>
> Key: TINKERPOP-3060
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3060
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: build-release
>Reporter: Wei Zhao
>Priority: Major
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> h3. Problem Desciption
> Currently some modules of Tinkerpop are using the same dependency. However, 
> some of these dependencies' versions are not centrally managed and therefore 
> cause discrepancy.
> I found the following dependencies with different versions in different 
> modules.
> {code:java}
> Dependency org.xerial.snappy:snappy-java:jar has inconsistent versions.
> Dependency {groupId=org.xerial.snappy, artifactId=snappy-java, 
> version=1.1.8.4}
> /spark-gremlin
> Dependency {groupId=org.xerial.snappy, artifactId=snappy-java, 
> version=1.1.8.2}
> /hadoop-gremlin
> -
> Dependency com.fasterxml.jackson.core:jackson-databind:jar has inconsistent 
> versions.
> Dependency {groupId=com.fasterxml.jackson.core, 
> artifactId=jackson-databind, version=2.15.2}
> /gremlin-shaded
> Dependency {groupId=com.fasterxml.jackson.core, 
> artifactId=jackson-databind, version=2.13.5}
> /spark-gremlin
> /hadoop-gremlin
> -
> {code}
> h3. Possible Outcome:
> This increases the maintenance workload and may lead to dependency conflict 
> for downstream projects. So it's better to align the versions of the 
> dependencies if the discrepancy is not intentional.
> h3. Possible Solution
> Align the versions of the dependencies to ensure consistency and avoid 
> possible conflicts. And if it's possible, manage the versions of the 
> dependencies centrally.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3028) Convert translators to make use of the grammar

2024-06-07 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3028:
---

spmallette merged PR #2640:
URL: https://github.com/apache/tinkerpop/pull/2640




> Convert translators to make use of the grammar
> --
>
> Key: TINKERPOP-3028
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3028
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: translator
>Affects Versions: 3.6.6
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
>
> {{Translator}} infrastructure uses bytecode and reflection which has a number 
> of technical imperfections and exemptions for it to work properly. Switching 
> to the grammar for translation simplifies the code, removes friction and 
> complexity when generating GLV tests, and should perform better. The focus 
> for this issue is the Java series of translators which are relied on quite 
> heavily. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3028) Convert translators to make use of the grammar

2024-06-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3028:
---

Cole-Greer commented on code in PR #2640:
URL: https://github.com/apache/tinkerpop/pull/2640#discussion_r1630462255


##
docs/src/upgrade/release-4.x.x.asciidoc:
##
@@ -118,11 +118,41 @@ passes lists with no elements matching the predicate.
 Integer overflows caused by addition and multiplication operations will throw 
an exception instead of being silently
 skipped with incorrect result.
 
+ SeedStrategy Construction
+
+The `SeedStrategy` public constructor has been removed for Java and has been 
replaced by the builder pattern common
+to all strategies. This change was made to ensure that the `SeedStrategy` 
could be constructed in a consistent manner.
+
  Removal of `gremlin-archetype`
 
 `gremlin-archetype`, which contained example projects demonstrating the use 
cases of TinkerPop, has been removed in
 favor of newer sample applications which can be found in each GLV's `examples` 
folder.
 
+ Improved Translators
+
+The various Java `Translator` implementations allowing conversion of Gremlin 
traversals to string forms in various
+languages have been modified considerably. First, they have been moved from to 
the
+`org.apache.tinkerpop.gremlin.language.translator` package, because they now 
depend on the ANTLR grammar in
+`gremlin-language` to handled the translation process. Making this change 
allowed for a more accurate translation of
+Gremlin that doesn't need to rely on reflection and positional arguments to 
determine which step was intended for use.
+
+Another important change was the introduction of specific translators for 
Groovy and Java. While Groovy translation
+tends to work for most Java cases, there is syntax specific to Groovy where it 
does not. With a specific Java
+translator, the translation process can be more accurate and less error prone.
+
+The syntax for the translators has simplified as well. The translator function 
now takes a Gremlin string and a target
+language to translate to. Consider the following example:
+
+[source,text]
+
+gremlin> GremlinTranslator.translate("g.V().out('knows')", Translator.GO)
+==>g.V().Out("knows")
+
+
+Further note that Gremlin language variants produce `gremlin-language` 
compliant strings directly since bytecode was
+removed. As a result, all translators in .NET, Python, C# and Javascript have 
been removed.

Review Comment:
   ```suggestion
   removed. As a result, all translators in .NET, Python, Go and Javascript 
have been removed.
   ```





> Convert translators to make use of the grammar
> --
>
> Key: TINKERPOP-3028
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3028
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: translator
>Affects Versions: 3.6.6
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
>
> {{Translator}} infrastructure uses bytecode and reflection which has a number 
> of technical imperfections and exemptions for it to work properly. Switching 
> to the grammar for translation simplifies the code, removes friction and 
> complexity when generating GLV tests, and should perform better. The focus 
> for this issue is the Java series of translators which are relied on quite 
> heavily. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3028) Convert translators to make use of the grammar

2024-06-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3028:
---

Cole-Greer commented on PR #2640:
URL: https://github.com/apache/tinkerpop/pull/2640#issuecomment-2153654347

   Thanks for all of the work on this, it is a big step forward to have modern 
gremlin-lang based translators.
   
   I primarily focused my review on the Go and JS translators here as it is a 
big PR and hard to capture everything at once. Prior to the release of TP4, I 
would like to add some tests to ensure successful translation of some of the 
more obscure literals, however I think that can be out of scope for this PR as 
the new translators are at least as well tested as the old ones.
   
   VOTE +1




> Convert translators to make use of the grammar
> --
>
> Key: TINKERPOP-3028
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3028
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: translator
>Affects Versions: 3.6.6
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
>
> {{Translator}} infrastructure uses bytecode and reflection which has a number 
> of technical imperfections and exemptions for it to work properly. Switching 
> to the grammar for translation simplifies the code, removes friction and 
> complexity when generating GLV tests, and should perform better. The focus 
> for this issue is the Java series of translators which are relied on quite 
> heavily. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-2837) Thread-safe problem when using Collections.synchronizedMap in ImmutableMetrics

2024-06-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-2837:
---

kenhuuu closed pull request #1908: TINKERPOP-2837 Fix NPE caused by a thread 
safe issue
URL: https://github.com/apache/tinkerpop/pull/1908




> Thread-safe problem when using Collections.synchronizedMap in ImmutableMetrics
> --
>
> Key: TINKERPOP-2837
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2837
> Project: TinkerPop
>  Issue Type: Bug
>  Components: language
>Affects Versions: 3.5.4
>Reporter: Redriver
>Priority: Major
>
> When I run the profile() in SparkGraphComputer, I got NPE:
>  
> g.V().hasLabel('Account').has('Source', 10).has('AccountId', 
> '117194').as('sourceAccount').match( 
> __.as('sourceAccount').outE().inV().hasLabel('phone').as('node1'), 
> __.as('sourceAccount').outE().inV().hasLabel('name').as('node2'), 
> __.as('node1').inE().outV().hasLabel('Account').as('targetAccount'), 
> __.as('targetAccount').outE().inV().as('node2'), where('targetAccount', 
> neq('sourceAccount'))).select('targetAccount').valueMap().profile()
>  
> 22/12/07 02:21:00.980 dag-scheduler-event-loop ERROR DAGScheduler: Failed to 
> update accumulator 17 (org.apache.spark.util.LegacyAccumulatorWrapper) for 
> task 188
> java.lang.NullPointerException
>         at 
> java.util.Collections$SynchronizedMap.entrySet(Collections.java:2613)
>         at 
> org.apache.tinkerpop.gremlin.process.traversal.util.MutableMetrics.aggregate(MutableMetrics.java:139)
>         at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.ProfileStep$ProfileBiOperator.apply(ProfileStep.java:136)
>         at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.ProfileStep$ProfileBiOperator.apply(ProfileStep.java:130)
>         at 
> org.apache.tinkerpop.gremlin.spark.process.computer.MemoryAccumulator.addAccumulator(MemoryAccumulator.java:43)
>         at 
> org.apache.tinkerpop.gremlin.spark.process.computer.MemoryAccumulator.addInPlace(MemoryAccumulator.java:48)
>         at 
> org.apache.tinkerpop.gremlin.spark.process.computer.MemoryAccumulator.addInPlace(MemoryAccumulator.java:29)
>         at 
> org.apache.spark.util.LegacyAccumulatorWrapper.merge(AccumulatorV2.scala:512)
>         at 
> org.apache.spark.scheduler.DAGScheduler$$anonfun$updateAccumulators$1.apply(DAGScheduler.scala:1255)
>         at 
> org.apache.spark.scheduler.DAGScheduler$$anonfun$updateAccumulators$1.apply(DAGScheduler.scala:1246)
>         at 
> scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
>         at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
>         at 
> org.apache.spark.scheduler.DAGScheduler.updateAccumulators(DAGScheduler.scala:1246)
>         at 
> org.apache.spark.scheduler.DAGScheduler.handleTaskCompletion(DAGScheduler.scala:1341)
>         at 
> org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.doOnReceive(DAGScheduler.scala:2105)
>         at 
> org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2057)
>         at 
> org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2046)
>         at org.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:49)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-2487) Add steps to support basic analysis like standard deviation and percentile

2024-06-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-2487:
---

kenhuuu closed pull request #1375: TINKERPOP-2487 add stdev and percentile steps
URL: https://github.com/apache/tinkerpop/pull/1375




> Add steps to support basic analysis like standard deviation and percentile
> --
>
> Key: TINKERPOP-2487
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2487
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.8
>Reporter: Guo Junshi
>Priority: Minor
>
> When using tinkerpop Gremlin for real use cases, we found that some general 
> analytical steps are very useful, yet not supported now. Some analytical 
> steps are general enough to be part of the official gremlin package, e.g. 
> steps to calculate standard deviation and percentile. The example usage might 
> be:
>  
> {code:java}
> gremlin> g.V().values('ages')
> ==>1
> ==>2
> ==>3
> gremlin> g.V().values('ages').stdev()
> ==>0.816
> gremlin> g.V().values('ages').fold().stdev(Scope.local)
> ==>0.816
> gremlin> g.V().values('ages').percentile(50)
> ==>2
> // one percentile, return single value
> gremlin> g.V().values('ages').percentile(0, 100)
> ==>[0: 1, 100: 3]
> // multiple percentiles, return a map{code}
> These steps are frequently used in our cases, and we think it would be great 
> to support them in official versions. 
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3082) Tinkerpop hardcoded the Spark AppName

2024-06-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3082:
---

kenhuuu merged PR #2634:
URL: https://github.com/apache/tinkerpop/pull/2634




> Tinkerpop hardcoded the Spark AppName
> -
>
> Key: TINKERPOP-3082
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3082
> Project: TinkerPop
>  Issue Type: Improvement
>Affects Versions: 3.7.2
>Reporter: Redriver
>Priority: Major
> Attachments: Screenshot 2024-06-03 at 16.14.17.png
>
>
> When I run gremlin through SparkGraphComputer, the SparkUI always displays 
> the Spark App as "[Apache TinkerPop's 
> Spark-Gremlin|http://hdc49-mcc10-01-0510-3405-002-tess0097.stratus.rno.ebay.com:4040/]";
>  (see 
> https://github.com/apache/tinkerpop/blob/master/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/Spark.java#L51)
>  which confused users if I run multiple gremlin with SparkGraphComputer.
> It should allow override the Spark App name if user wants to. If user does 
> not specify the Spark app name, we can provide the default one.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3028) Convert translators to make use of the grammar

2024-06-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3028:
---

vkagamlyk commented on PR #2640:
URL: https://github.com/apache/tinkerpop/pull/2640#issuecomment-2152919595

   thank you for this huge piece of work!
   VOTE+1




> Convert translators to make use of the grammar
> --
>
> Key: TINKERPOP-3028
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3028
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: translator
>Affects Versions: 3.6.6
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
>
> {{Translator}} infrastructure uses bytecode and reflection which has a number 
> of technical imperfections and exemptions for it to work properly. Switching 
> to the grammar for translation simplifies the code, removes friction and 
> complexity when generating GLV tests, and should perform better. The focus 
> for this issue is the Java series of translators which are relied on quite 
> heavily. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3028) Convert translators to make use of the grammar

2024-06-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3028:
---

vkagamlyk commented on code in PR #2640:
URL: https://github.com/apache/tinkerpop/pull/2640#discussion_r1629728583


##
gremlin-python/src/main/python/gremlin_python/process/graph_traversal.py:
##
@@ -2236,6 +2243,10 @@ def r_trim(*args):
 return __.r_trim(*args)
 
 
+def r_trim(*args):

Review Comment:
   and one more duplicate `r_trim` definition



##
gremlin-python/src/main/python/gremlin_python/process/graph_traversal.py:
##
@@ -2112,6 +2116,9 @@ def l_trim(*args):
 return __.l_trim(*args)
 
 
+def l_trim(*args):

Review Comment:
   one more duplicate `l_trim` definition





> Convert translators to make use of the grammar
> --
>
> Key: TINKERPOP-3028
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3028
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: translator
>Affects Versions: 3.6.6
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
>
> {{Translator}} infrastructure uses bytecode and reflection which has a number 
> of technical imperfections and exemptions for it to work properly. Switching 
> to the grammar for translation simplifies the code, removes friction and 
> complexity when generating GLV tests, and should perform better. The focus 
> for this issue is the Java series of translators which are relied on quite 
> heavily. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3082) Tinkerpop hardcoded the Spark AppName

2024-06-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3082:
---

ministat commented on PR #2634:
URL: https://github.com/apache/tinkerpop/pull/2634#issuecomment-2152742660

   The conflict was fixed.




> Tinkerpop hardcoded the Spark AppName
> -
>
> Key: TINKERPOP-3082
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3082
> Project: TinkerPop
>  Issue Type: Improvement
>Affects Versions: 3.7.2
>Reporter: Redriver
>Priority: Major
> Attachments: Screenshot 2024-06-03 at 16.14.17.png
>
>
> When I run gremlin through SparkGraphComputer, the SparkUI always displays 
> the Spark App as "[Apache TinkerPop's 
> Spark-Gremlin|http://hdc49-mcc10-01-0510-3405-002-tess0097.stratus.rno.ebay.com:4040/]";
>  (see 
> https://github.com/apache/tinkerpop/blob/master/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/Spark.java#L51)
>  which confused users if I run multiple gremlin with SparkGraphComputer.
> It should allow override the Spark App name if user wants to. If user does 
> not specify the Spark app name, we can provide the default one.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3028) Convert translators to make use of the grammar

2024-06-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3028:
---

spmallette commented on code in PR #2640:
URL: https://github.com/apache/tinkerpop/pull/2640#discussion_r1629337486


##
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalMethodVisitor.java:
##


Review Comment:
   adding it.





> Convert translators to make use of the grammar
> --
>
> Key: TINKERPOP-3028
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3028
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: translator
>Affects Versions: 3.6.6
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
>
> {{Translator}} infrastructure uses bytecode and reflection which has a number 
> of technical imperfections and exemptions for it to work properly. Switching 
> to the grammar for translation simplifies the code, removes friction and 
> complexity when generating GLV tests, and should perform better. The focus 
> for this issue is the Java series of translators which are relied on quite 
> heavily. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3028) Convert translators to make use of the grammar

2024-06-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3028:
---

spmallette commented on code in PR #2640:
URL: https://github.com/apache/tinkerpop/pull/2640#discussion_r1629336861


##
gremlin-python/src/main/python/gremlin_python/process/graph_traversal.py:
##
@@ -1424,6 +1428,10 @@ def ltrim(cls, *args):
 def l_trim(cls, *args):
 return cls.graph_traversal(None, None, Bytecode()).l_trim(*args)
 
+@classmethod

Review Comment:
   thanks for noticing that.





> Convert translators to make use of the grammar
> --
>
> Key: TINKERPOP-3028
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3028
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: translator
>Affects Versions: 3.6.6
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
>
> {{Translator}} infrastructure uses bytecode and reflection which has a number 
> of technical imperfections and exemptions for it to work properly. Switching 
> to the grammar for translation simplifies the code, removes friction and 
> complexity when generating GLV tests, and should perform better. The focus 
> for this issue is the Java series of translators which are relied on quite 
> heavily. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3028) Convert translators to make use of the grammar

2024-06-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3028:
---

spmallette commented on code in PR #2640:
URL: https://github.com/apache/tinkerpop/pull/2640#discussion_r1629336099


##
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/JavaTranslateVisitor.java:
##
@@ -0,0 +1,271 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.language.translator;
+
+import org.antlr.v4.runtime.tree.ParseTree;
+import org.antlr.v4.runtime.tree.TerminalNode;
+import org.apache.tinkerpop.gremlin.language.grammar.GremlinParser;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
+import org.apache.tinkerpop.gremlin.util.DatetimeHelper;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Optional;
+import java.util.stream.Collectors;
+
+/**
+ * Converts a Gremlin traversal string into a Java source code representation 
of that traversal with an aim at
+ * sacrificing some formatting for the ability to compile correctly.
+ * 
+ * Range syntax has no direct support
+ * Normalizes whitespace
+ * Normalize numeric suffixes to lower case
+ * If floats are not suffixed they will translate as BigDecimal
+ * Makes anonymous traversals explicit with double underscore
+ * Makes enums explicit with their proper name
+ * 
+ */
+public class JavaTranslateVisitor extends AbstractTranslateVisitor {
+public JavaTranslateVisitor() {
+super("g");
+}
+
+public JavaTranslateVisitor(final String graphTraversalSourceName) {
+super(graphTraversalSourceName);
+}
+
+@Override
+public Void visitStructureVertex(final 
GremlinParser.StructureVertexContext ctx) {
+sb.append("new DetachedVertex(");

Review Comment:
   I suppose `ReferenceVertex` is better. This is truly a "reference" I guess. 





> Convert translators to make use of the grammar
> --
>
> Key: TINKERPOP-3028
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3028
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: translator
>Affects Versions: 3.6.6
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
>
> {{Translator}} infrastructure uses bytecode and reflection which has a number 
> of technical imperfections and exemptions for it to work properly. Switching 
> to the grammar for translation simplifies the code, removes friction and 
> complexity when generating GLV tests, and should perform better. The focus 
> for this issue is the Java series of translators which are relied on quite 
> heavily. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3028) Convert translators to make use of the grammar

2024-06-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3028:
---

spmallette commented on code in PR #2640:
URL: https://github.com/apache/tinkerpop/pull/2640#discussion_r1629326032


##
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/GoTranslateVisitor.java:
##
@@ -0,0 +1,292 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.language.translator;
+
+import org.antlr.v4.runtime.ParserRuleContext;
+import org.antlr.v4.runtime.tree.ParseTree;
+import org.antlr.v4.runtime.tree.TerminalNode;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.tinkerpop.gremlin.language.grammar.GremlinParser;
+import org.apache.tinkerpop.gremlin.structure.VertexProperty;
+import org.apache.tinkerpop.gremlin.util.DatetimeHelper;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+public class GoTranslateVisitor extends AbstractTranslateVisitor {
+private final static String GO_PACKAGE_NAME = "gremlingo.";
+
+public GoTranslateVisitor() {
+super("g");
+}
+
+public GoTranslateVisitor(final String graphTraversalSourceName) {
+super(graphTraversalSourceName);
+}
+
+@Override
+public Void visitDateLiteral(final GremlinParser.DateLiteralContext ctx) {
+// child at 2 is the date argument to datetime() and comes enclosed in 
quotes
+final String dtString = ctx.getChild(2).getText();
+final Date dt = 
DatetimeHelper.parse(removeFirstAndLastCharacters(dtString));
+sb.append("time.UnixMilli(" + dt.getTime() + ")");
+return null;
+}
+
+@Override
+public Void visitInfLiteral(final GremlinParser.InfLiteralContext ctx) {
+if (ctx.SignedInfLiteral().getText().equals("-Infinity"))
+sb.append("math.Inf(-11)");

Review Comment:
   oops - i even wrote the test incorrectly. good find.





> Convert translators to make use of the grammar
> --
>
> Key: TINKERPOP-3028
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3028
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: translator
>Affects Versions: 3.6.6
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
>
> {{Translator}} infrastructure uses bytecode and reflection which has a number 
> of technical imperfections and exemptions for it to work properly. Switching 
> to the grammar for translation simplifies the code, removes friction and 
> complexity when generating GLV tests, and should perform better. The focus 
> for this issue is the Java series of translators which are relied on quite 
> heavily. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3028) Convert translators to make use of the grammar

2024-06-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3028:
---

spmallette commented on code in PR #2640:
URL: https://github.com/apache/tinkerpop/pull/2640#discussion_r1629321567


##
gremlin-dotnet/build/generate.groovy:
##
@@ -175,6 +137,11 @@ radishGremlinFile.withWriter('UTF-8') { Writer writer ->
 'list.RemoveAt(0);\n' +
 'return f.Invoke(g, parameters);\n' +
 '}\n' +
+'\n' +
+'public static bool HasTraversal(string scenarioName)\n' +

Review Comment:
   it was being used, but i switched to statically defining the unsupported 
lambda tests. removing it.





> Convert translators to make use of the grammar
> --
>
> Key: TINKERPOP-3028
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3028
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: translator
>Affects Versions: 3.6.6
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
>
> {{Translator}} infrastructure uses bytecode and reflection which has a number 
> of technical imperfections and exemptions for it to work properly. Switching 
> to the grammar for translation simplifies the code, removes friction and 
> complexity when generating GLV tests, and should perform better. The focus 
> for this issue is the Java series of translators which are relied on quite 
> heavily. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3028) Convert translators to make use of the grammar

2024-06-05 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3028:
---

vkagamlyk commented on code in PR #2640:
URL: https://github.com/apache/tinkerpop/pull/2640#discussion_r1628508979


##
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/JavaTranslateVisitor.java:
##
@@ -0,0 +1,271 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.language.translator;
+
+import org.antlr.v4.runtime.tree.ParseTree;
+import org.antlr.v4.runtime.tree.TerminalNode;
+import org.apache.tinkerpop.gremlin.language.grammar.GremlinParser;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
+import org.apache.tinkerpop.gremlin.util.DatetimeHelper;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Optional;
+import java.util.stream.Collectors;
+
+/**
+ * Converts a Gremlin traversal string into a Java source code representation 
of that traversal with an aim at
+ * sacrificing some formatting for the ability to compile correctly.
+ * 
+ * Range syntax has no direct support
+ * Normalizes whitespace
+ * Normalize numeric suffixes to lower case
+ * If floats are not suffixed they will translate as BigDecimal
+ * Makes anonymous traversals explicit with double underscore
+ * Makes enums explicit with their proper name
+ * 
+ */
+public class JavaTranslateVisitor extends AbstractTranslateVisitor {
+public JavaTranslateVisitor() {
+super("g");
+}
+
+public JavaTranslateVisitor(final String graphTraversalSourceName) {
+super(graphTraversalSourceName);
+}
+
+@Override
+public Void visitStructureVertex(final 
GremlinParser.StructureVertexContext ctx) {
+sb.append("new DetachedVertex(");

Review Comment:
   [Discuss] what is better to use in this case 'DetachedVertex' or 
`ReferenceVertex`?





> Convert translators to make use of the grammar
> --
>
> Key: TINKERPOP-3028
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3028
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: translator
>Affects Versions: 3.6.6
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
>
> {{Translator}} infrastructure uses bytecode and reflection which has a number 
> of technical imperfections and exemptions for it to work properly. Switching 
> to the grammar for translation simplifies the code, removes friction and 
> complexity when generating GLV tests, and should perform better. The focus 
> for this issue is the Java series of translators which are relied on quite 
> heavily. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3028) Convert translators to make use of the grammar

2024-06-05 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3028:
---

vkagamlyk commented on code in PR #2640:
URL: https://github.com/apache/tinkerpop/pull/2640#discussion_r1628506208


##
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/GroovyTranslateVisitor.java:
##
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.language.translator;
+
+import org.apache.tinkerpop.gremlin.language.grammar.GremlinParser;
+
+/**
+ * Converts a Gremlin traversal string into a Groovy source code 
representation of that traversal with an aim at
+ * sacrificing some formatting for the ability to compile correctly. The 
translations may require use of TinkerPop's
+ * sugar syntax and therefore requires use of the {@code GremlinLoader} in the 
gremlin-groovy module unless you are
+ * specifically certain that your translations will not result in the use of 
that syntax. If in doubt, prefer the
+ * {@link JavaTranslateVisitor} instead.
+ * 
+ * Normalize numeric suffixes to lower case
+ * If floats are not suffixed they will translate as BigDecimal
+ * Makes anonymous traversals explicit with double underscore
+ * Makes enums explicit with their proper name
+ * 
+ */
+public class GroovyTranslateVisitor extends TranslateVisitor {
+public GroovyTranslateVisitor() {
+this("g");
+}
+
+public GroovyTranslateVisitor(final String graphTraversalSourceName) {
+super(graphTraversalSourceName);
+}
+
+@Override
+public Void visitStructureVertex(final 
GremlinParser.StructureVertexContext ctx) {
+sb.append("new DetachedVertex(");
+visit(ctx.getChild(3)); // id
+sb.append(", ");
+visit(ctx.getChild(5)); // label
+sb.append(")");
+return null;
+}
+
+@Override
+public Void visitIntegerLiteral(final GremlinParser.IntegerLiteralContext 
ctx) {
+final String integerLiteral = ctx.getText().toLowerCase();
+
+// check suffix
+final int lastCharIndex = integerLiteral.length() - 1;
+final char lastCharacter = integerLiteral.charAt(lastCharIndex);
+switch (lastCharacter) {
+case 'b':
+// parse B/b as byte
+sb.append("new Byte(");
+sb.append(integerLiteral, 0, lastCharIndex);
+sb.append(")");
+break;
+case 's':
+// parse S/s as short
+sb.append("new Short(");
+sb.append(integerLiteral, 0, lastCharIndex);
+sb.append(")");
+break;
+case 'i':
+case 'l':
+// parse I/i and L/l as Integer and Long respectively
+sb.append(integerLiteral, 0, 
lastCharIndex).append(lastCharacter);

Review Comment:
   nit: no need special handling for i/l case, it's same as default





> Convert translators to make use of the grammar
> --
>
> Key: TINKERPOP-3028
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3028
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: translator
>Affects Versions: 3.6.6
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
>
> {{Translator}} infrastructure uses bytecode and reflection which has a number 
> of technical imperfections and exemptions for it to work properly. Switching 
> to the grammar for translation simplifies the code, removes friction and 
> complexity when generating GLV tests, and should perform better. The focus 
> for this issue is the Java series of translators which are relied on quite 
> heavily. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3028) Convert translators to make use of the grammar

2024-06-05 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3028:
---

vkagamlyk commented on code in PR #2640:
URL: https://github.com/apache/tinkerpop/pull/2640#discussion_r1628500051


##
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/GoTranslateVisitor.java:
##
@@ -0,0 +1,292 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.language.translator;
+
+import org.antlr.v4.runtime.ParserRuleContext;
+import org.antlr.v4.runtime.tree.ParseTree;
+import org.antlr.v4.runtime.tree.TerminalNode;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.tinkerpop.gremlin.language.grammar.GremlinParser;
+import org.apache.tinkerpop.gremlin.structure.VertexProperty;
+import org.apache.tinkerpop.gremlin.util.DatetimeHelper;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+public class GoTranslateVisitor extends AbstractTranslateVisitor {
+private final static String GO_PACKAGE_NAME = "gremlingo.";
+
+public GoTranslateVisitor() {
+super("g");
+}
+
+public GoTranslateVisitor(final String graphTraversalSourceName) {
+super(graphTraversalSourceName);
+}
+
+@Override
+public Void visitDateLiteral(final GremlinParser.DateLiteralContext ctx) {
+// child at 2 is the date argument to datetime() and comes enclosed in 
quotes
+final String dtString = ctx.getChild(2).getText();
+final Date dt = 
DatetimeHelper.parse(removeFirstAndLastCharacters(dtString));
+sb.append("time.UnixMilli(" + dt.getTime() + ")");
+return null;
+}
+
+@Override
+public Void visitInfLiteral(final GremlinParser.InfLiteralContext ctx) {
+if (ctx.SignedInfLiteral().getText().equals("-Infinity"))
+sb.append("math.Inf(-11)");

Review Comment:
   ```suggestion
   sb.append("math.Inf(-1)");
   ```





> Convert translators to make use of the grammar
> --
>
> Key: TINKERPOP-3028
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3028
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: translator
>Affects Versions: 3.6.6
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
>
> {{Translator}} infrastructure uses bytecode and reflection which has a number 
> of technical imperfections and exemptions for it to work properly. Switching 
> to the grammar for translation simplifies the code, removes friction and 
> complexity when generating GLV tests, and should perform better. The focus 
> for this issue is the Java series of translators which are relied on quite 
> heavily. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3028) Convert translators to make use of the grammar

2024-06-05 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3028:
---

vkagamlyk commented on code in PR #2640:
URL: https://github.com/apache/tinkerpop/pull/2640#discussion_r1628482186


##
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/AnonymizedTranslatorVisitor.java:
##
@@ -0,0 +1,181 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.language.translator;
+
+import org.antlr.v4.runtime.ParserRuleContext;
+import org.apache.tinkerpop.gremlin.language.grammar.GremlinParser;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * A translator that anonymizes Gremlin so that arguments that might contain 
sensitive information are removed.
+ */
+public class AnonymizedTranslatorVisitor extends TranslateVisitor {
+
+private final Map> simpleNameToObjectCache = 
new HashMap<>();
+
+public AnonymizedTranslatorVisitor() {
+this("g");
+}
+
+public AnonymizedTranslatorVisitor(final String graphTraversalSourceName) {
+super(graphTraversalSourceName);
+}
+
+/**
+ * Anonymizes the given context by replacing the text with a lower case 
version of the class name and a number
+ * that is incremented for each unique value.
+ *
+ * @param ctx   the context to anonymize
+ * @param clazz the class of the context
+ * @return null
+ */
+protected Void anonymize(final ParserRuleContext ctx, final Class 
clazz) {
+final String text = ctx.getText();
+final String type = clazz.getSimpleName();
+Map objectToAnonymizedString = 
simpleNameToObjectCache.get(type);
+if (objectToAnonymizedString != null){
+// this object type has been handled at least once before
+final String innerValue = objectToAnonymizedString.get(text);
+if (innerValue != null){
+sb.append(innerValue);
+} else {
+final String anonymizedValue = type.toLowerCase() + 
objectToAnonymizedString.size();
+objectToAnonymizedString.put(text, anonymizedValue);
+sb.append(anonymizedValue);
+}
+} else {
+objectToAnonymizedString = new HashMap<>();
+simpleNameToObjectCache.put(type, objectToAnonymizedString);
+final String anonymizedValue = type.toLowerCase() + 
objectToAnonymizedString.size();
+objectToAnonymizedString.put(text, anonymizedValue);
+sb.append(anonymizedValue);
+}
+return null;
+}
+
+@Override
+public Void visitGenericLiteralCollection(final 
GremlinParser.GenericLiteralCollectionContext ctx) {
+return anonymize(ctx, List.class);
+}
+
+@Override
+public Void visitGenericLiteralMap(final 
GremlinParser.GenericLiteralMapContext ctx) {
+return anonymize(ctx, Map.class);
+}
+
+@Override
+public Void visitGenericLiteralMapNullableArgument(final 
GremlinParser.GenericLiteralMapNullableArgumentContext ctx) {
+return anonymize(ctx, Map.class);
+}
+
+@Override
+public Void visitStringLiteral(final GremlinParser.StringLiteralContext 
ctx) {
+return anonymize(ctx, String.class);
+}
+
+@Override
+public Void visitStringNullableLiteral(final 
GremlinParser.StringNullableLiteralContext ctx) {
+return anonymize(ctx, String.class);
+}
+
+@Override
+public Void visitIntegerLiteral(final GremlinParser.IntegerLiteralContext 
ctx) {
+final String integerLiteral = ctx.getText().toLowerCase();
+
+// check suffix
+final int lastCharIndex = integerLiteral.length() - 1;
+final char lastCharacter = integerLiteral.charAt(lastCharIndex);
+switch (lastCharacter) {
+case 'b':
+anonymize(ctx

[jira] [Commented] (TINKERPOP-3028) Convert translators to make use of the grammar

2024-06-05 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3028:
---

vkagamlyk commented on code in PR #2640:
URL: https://github.com/apache/tinkerpop/pull/2640#discussion_r1628468763


##
gremlin-python/src/main/python/gremlin_python/process/graph_traversal.py:
##
@@ -1424,6 +1428,10 @@ def ltrim(cls, *args):
 def l_trim(cls, *args):
 return cls.graph_traversal(None, None, Bytecode()).l_trim(*args)
 
+@classmethod

Review Comment:
   Looks like there's an issue with merge.
   Duplicate `l_trim` and `r_trim` function definition (4 times in total).
   





> Convert translators to make use of the grammar
> --
>
> Key: TINKERPOP-3028
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3028
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: translator
>Affects Versions: 3.6.6
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
>
> {{Translator}} infrastructure uses bytecode and reflection which has a number 
> of technical imperfections and exemptions for it to work properly. Switching 
> to the grammar for translation simplifies the code, removes friction and 
> complexity when generating GLV tests, and should perform better. The focus 
> for this issue is the Java series of translators which are relied on quite 
> heavily. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3028) Convert translators to make use of the grammar

2024-06-05 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3028:
---

vkagamlyk commented on code in PR #2640:
URL: https://github.com/apache/tinkerpop/pull/2640#discussion_r1628459561


##
gremlin-dotnet/build/generate.groovy:
##
@@ -175,6 +137,11 @@ radishGremlinFile.withWriter('UTF-8') { Writer writer ->
 'list.RemoveAt(0);\n' +
 'return f.Invoke(g, parameters);\n' +
 '}\n' +
+'\n' +
+'public static bool HasTraversal(string scenarioName)\n' +

Review Comment:
   where is `HasTraversal` used?





> Convert translators to make use of the grammar
> --
>
> Key: TINKERPOP-3028
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3028
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: translator
>Affects Versions: 3.6.6
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
>
> {{Translator}} infrastructure uses bytecode and reflection which has a number 
> of technical imperfections and exemptions for it to work properly. Switching 
> to the grammar for translation simplifies the code, removes friction and 
> complexity when generating GLV tests, and should perform better. The focus 
> for this issue is the Java series of translators which are relied on quite 
> heavily. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3028) Convert translators to make use of the grammar

2024-06-05 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3028:
---

vkagamlyk commented on code in PR #2640:
URL: https://github.com/apache/tinkerpop/pull/2640#discussion_r1628455738


##
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalMethodVisitor.java:
##


Review Comment:
   `visitTraversalMethod_option_Merge_Map_Cardinality` have middle argument 
(Map) defined in grammar as `genericLiteralMapNullableArgument`, but we handle 
only  `genericLiteralMap` and `nullLiteral` cases, not `variable`.
   
  ```
@Override
   public Traversal visitTraversalMethod_option_Merge_Map_Cardinality(final 
GremlinParser.TraversalMethod_option_Merge_Map_CardinalityContext ctx) {
   if (ctx.genericLiteralMapNullableArgument().nullLiteral() != null) {
   return 
this.graphTraversal.option(antlr.argumentVisitor.parseMerge(ctx.traversalMergeArgument()),
 (Map) null);
   }
   
   // proposed addition
   if (ctx.genericLiteralMapNullableArgument().variable() != null) {
   return 
graphTraversal.option(antlr.argumentVisitor.parseMerge(ctx.traversalMergeArgument()),
   (Map) 
antlr.argumentVisitor.visitVariable(ctx.genericLiteralMapNullableArgument().variable()),
   
TraversalEnumParser.parseTraversalEnumFromContext(Cardinality.class, 
ctx.traversalCardinality()));
   }
   // end of proposed addition
   
   return 
graphTraversal.option(antlr.argumentVisitor.parseMerge(ctx.traversalMergeArgument()),
   (Map) new 
GenericLiteralVisitor(antlr).visitGenericLiteralMap(ctx.genericLiteralMapNullableArgument().genericLiteralMap()),
   
TraversalEnumParser.parseTraversalEnumFromContext(Cardinality.class, 
ctx.traversalCardinality()));
   }
   ```
   
   
   





> Convert translators to make use of the grammar
> --
>
> Key: TINKERPOP-3028
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3028
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: translator
>Affects Versions: 3.6.6
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
>
> {{Translator}} infrastructure uses bytecode and reflection which has a number 
> of technical imperfections and exemptions for it to work properly. Switching 
> to the grammar for translation simplifies the code, removes friction and 
> complexity when generating GLV tests, and should perform better. The focus 
> for this issue is the Java series of translators which are relied on quite 
> heavily. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3082) Tinkerpop hardcoded the Spark AppName

2024-06-05 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3082:
---

kenhuuu commented on PR #2634:
URL: https://github.com/apache/tinkerpop/pull/2634#issuecomment-2150554973

   > I have moved the description to the place you suggested. Please help 
verify it.
   
   Yes, this is correct location, but it appears another change was committed 
to 3.7-dev to the CHANGELOG that caused a minor merge conflict in your PR. Do 
you mind updating this again?




> Tinkerpop hardcoded the Spark AppName
> -
>
> Key: TINKERPOP-3082
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3082
> Project: TinkerPop
>  Issue Type: Improvement
>Affects Versions: 3.7.2
>Reporter: Redriver
>Priority: Major
> Attachments: Screenshot 2024-06-03 at 16.14.17.png
>
>
> When I run gremlin through SparkGraphComputer, the SparkUI always displays 
> the Spark App as "[Apache TinkerPop's 
> Spark-Gremlin|http://hdc49-mcc10-01-0510-3405-002-tess0097.stratus.rno.ebay.com:4040/]";
>  (see 
> https://github.com/apache/tinkerpop/blob/master/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/Spark.java#L51)
>  which confused users if I run multiple gremlin with SparkGraphComputer.
> It should allow override the Spark App name if user wants to. If user does 
> not specify the Spark app name, we can provide the default one.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3082) Tinkerpop hardcoded the Spark AppName

2024-06-05 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3082:
---

ministat commented on PR #2634:
URL: https://github.com/apache/tinkerpop/pull/2634#issuecomment-2150433625

   I have moved the description to the place you suggested. Please help verify 
it.




> Tinkerpop hardcoded the Spark AppName
> -
>
> Key: TINKERPOP-3082
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3082
> Project: TinkerPop
>  Issue Type: Improvement
>Affects Versions: 3.7.2
>Reporter: Redriver
>Priority: Major
> Attachments: Screenshot 2024-06-03 at 16.14.17.png
>
>
> When I run gremlin through SparkGraphComputer, the SparkUI always displays 
> the Spark App as "[Apache TinkerPop's 
> Spark-Gremlin|http://hdc49-mcc10-01-0510-3405-002-tess0097.stratus.rno.ebay.com:4040/]";
>  (see 
> https://github.com/apache/tinkerpop/blob/master/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/Spark.java#L51)
>  which confused users if I run multiple gremlin with SparkGraphComputer.
> It should allow override the Spark App name if user wants to. If user does 
> not specify the Spark app name, we can provide the default one.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3028) Convert translators to make use of the grammar

2024-06-05 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3028:
---

spmallette opened a new pull request, #2640:
URL: https://github.com/apache/tinkerpop/pull/2640

   https://issues.apache.org/jira/browse/TINKERPOP-3028
   
   Added a normalizer for language and an anonymizer implementation as well. 
Extract parameter names. Updated test setups to use the new translators.
   
   Worth noting that this isn't quite complete - see all the linked JIRA on 
TINKERPOP-3028. All of that will need to be done still but this seems like a 
good enough chunk to merge now and in its current form may allow some other 
work to proceed more easily.
   
   VOTE +1




> Convert translators to make use of the grammar
> --
>
> Key: TINKERPOP-3028
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3028
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: translator
>Affects Versions: 3.6.6
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
>
> {{Translator}} infrastructure uses bytecode and reflection which has a number 
> of technical imperfections and exemptions for it to work properly. Switching 
> to the grammar for translation simplifies the code, removes friction and 
> complexity when generating GLV tests, and should perform better. The focus 
> for this issue is the Java series of translators which are relied on quite 
> heavily. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3082) Tinkerpop hardcoded the Spark AppName

2024-06-05 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3082:
---

ministat commented on code in PR #2634:
URL: https://github.com/apache/tinkerpop/pull/2634#discussion_r1627147059


##
CHANGELOG.asciidoc:
##
@@ -64,6 +64,7 @@ This release also includes changes from <>.
 * TINKERPOP-3021 Publish ARM64 Gremlin Console Images
 * TINKERPOP-3030 Update to .NET 8
 * TINKERPOP-3068 Make serviceName and mergedParams public for provider usage 
in CallStep
+* TINKERPOP-3082 Allow specifying a customized Spark app name

Review Comment:
   DONE





> Tinkerpop hardcoded the Spark AppName
> -
>
> Key: TINKERPOP-3082
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3082
> Project: TinkerPop
>  Issue Type: Improvement
>Affects Versions: 3.7.2
>Reporter: Redriver
>Priority: Major
> Attachments: Screenshot 2024-06-03 at 16.14.17.png
>
>
> When I run gremlin through SparkGraphComputer, the SparkUI always displays 
> the Spark App as "[Apache TinkerPop's 
> Spark-Gremlin|http://hdc49-mcc10-01-0510-3405-002-tess0097.stratus.rno.ebay.com:4040/]";
>  (see 
> https://github.com/apache/tinkerpop/blob/master/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/Spark.java#L51)
>  which confused users if I run multiple gremlin with SparkGraphComputer.
> It should allow override the Spark App name if user wants to. If user does 
> not specify the Spark app name, we can provide the default one.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3082) Tinkerpop hardcoded the Spark AppName

2024-06-04 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3082:
---

kenhuuu commented on PR #2634:
URL: https://github.com/apache/tinkerpop/pull/2634#issuecomment-2148679915

   Sorry again for not being clear about where to add the CHANGELOG entry. 
After you move that line, I will merge this PR.




> Tinkerpop hardcoded the Spark AppName
> -
>
> Key: TINKERPOP-3082
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3082
> Project: TinkerPop
>  Issue Type: Improvement
>Affects Versions: 3.7.2
>Reporter: Redriver
>Priority: Major
> Attachments: Screenshot 2024-06-03 at 16.14.17.png
>
>
> When I run gremlin through SparkGraphComputer, the SparkUI always displays 
> the Spark App as "[Apache TinkerPop's 
> Spark-Gremlin|http://hdc49-mcc10-01-0510-3405-002-tess0097.stratus.rno.ebay.com:4040/]";
>  (see 
> https://github.com/apache/tinkerpop/blob/master/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/Spark.java#L51)
>  which confused users if I run multiple gremlin with SparkGraphComputer.
> It should allow override the Spark App name if user wants to. If user does 
> not specify the Spark app name, we can provide the default one.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3082) Tinkerpop hardcoded the Spark AppName

2024-06-04 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3082:
---

kenhuuu commented on code in PR #2634:
URL: https://github.com/apache/tinkerpop/pull/2634#discussion_r1626800701


##
CHANGELOG.asciidoc:
##
@@ -64,6 +64,7 @@ This release also includes changes from <>.
 * TINKERPOP-3021 Publish ARM64 Gremlin Console Images
 * TINKERPOP-3030 Update to .NET 8
 * TINKERPOP-3068 Make serviceName and mergedParams public for provider usage 
in CallStep
+* TINKERPOP-3082 Allow specifying a customized Spark app name

Review Comment:
   Sorry, I should have been more specific. Please remove this and add 
something like `Allow specifying a customized Spark app name` to 
https://github.com/apache/tinkerpop/blob/3.7-dev/CHANGELOG.asciidoc?plain=1#L30
   
   This "Improvements" section is automatically generated during release so it 
shouldn't be manually modified.





> Tinkerpop hardcoded the Spark AppName
> -
>
> Key: TINKERPOP-3082
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3082
> Project: TinkerPop
>  Issue Type: Improvement
>Affects Versions: 3.7.2
>Reporter: Redriver
>Priority: Major
> Attachments: Screenshot 2024-06-03 at 16.14.17.png
>
>
> When I run gremlin through SparkGraphComputer, the SparkUI always displays 
> the Spark App as "[Apache TinkerPop's 
> Spark-Gremlin|http://hdc49-mcc10-01-0510-3405-002-tess0097.stratus.rno.ebay.com:4040/]";
>  (see 
> https://github.com/apache/tinkerpop/blob/master/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/Spark.java#L51)
>  which confused users if I run multiple gremlin with SparkGraphComputer.
> It should allow override the Spark App name if user wants to. If user does 
> not specify the Spark app name, we can provide the default one.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3082) Tinkerpop hardcoded the Spark AppName

2024-06-04 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3082:
---

Cole-Greer commented on PR #2634:
URL: https://github.com/apache/tinkerpop/pull/2634#issuecomment-2148621028

   Thanks @ministat, LGTM
   VOTE +1




> Tinkerpop hardcoded the Spark AppName
> -
>
> Key: TINKERPOP-3082
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3082
> Project: TinkerPop
>  Issue Type: Improvement
>Affects Versions: 3.7.2
>Reporter: Redriver
>Priority: Major
> Attachments: Screenshot 2024-06-03 at 16.14.17.png
>
>
> When I run gremlin through SparkGraphComputer, the SparkUI always displays 
> the Spark App as "[Apache TinkerPop's 
> Spark-Gremlin|http://hdc49-mcc10-01-0510-3405-002-tess0097.stratus.rno.ebay.com:4040/]";
>  (see 
> https://github.com/apache/tinkerpop/blob/master/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/Spark.java#L51)
>  which confused users if I run multiple gremlin with SparkGraphComputer.
> It should allow override the Spark App name if user wants to. If user does 
> not specify the Spark app name, we can provide the default one.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3082) Tinkerpop hardcoded the Spark AppName

2024-06-04 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3082:
---

vkagamlyk commented on PR #2634:
URL: https://github.com/apache/tinkerpop/pull/2634#issuecomment-2148618787

   VOTE+1




> Tinkerpop hardcoded the Spark AppName
> -
>
> Key: TINKERPOP-3082
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3082
> Project: TinkerPop
>  Issue Type: Improvement
>Affects Versions: 3.7.2
>Reporter: Redriver
>Priority: Major
> Attachments: Screenshot 2024-06-03 at 16.14.17.png
>
>
> When I run gremlin through SparkGraphComputer, the SparkUI always displays 
> the Spark App as "[Apache TinkerPop's 
> Spark-Gremlin|http://hdc49-mcc10-01-0510-3405-002-tess0097.stratus.rno.ebay.com:4040/]";
>  (see 
> https://github.com/apache/tinkerpop/blob/master/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/Spark.java#L51)
>  which confused users if I run multiple gremlin with SparkGraphComputer.
> It should allow override the Spark App name if user wants to. If user does 
> not specify the Spark app name, we can provide the default one.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3060) Dependency inconsistency between modules.

2024-06-04 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3060:
---

xiazcy commented on PR #2546:
URL: https://github.com/apache/tinkerpop/pull/2546#issuecomment-2148166240

   Hi @HappyHacker123, much apologies for the late reply. I gave it some more 
thoughts, and while this will be a great improvement, I don't think we are 
quite ready to centralize these dependencies yet. The complexity is mainly due 
to the way dependencies are currently managed that’s leading to conflicts and 
may require module-specific versions, especially in hadoop and spark modules 
(as you may see some of the code comments in the poms). We are looking to 
improve this systemically, but before a decision is reached I think we’ll hold 
off on this PR and close it for now. 
   
   If you are still interested and have thoughts or recommendations related to 
dependency management, chime into our discussions for [removing 
gremlin-shaded](https://lists.apache.org/thread/m7yvvz9zc69nzn0nr6vz0tdo3ggffoy6)
 and [JPMS](https://lists.apache.org/thread/vkvqcxn6t2lsgpfym7v3g3qvksrh3cwc). 
We'd love to see more opinions on these topics. Again, thank you for taking the 
time submitting this PR! 




> Dependency inconsistency between modules.
> -
>
> Key: TINKERPOP-3060
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3060
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: build-release
>Reporter: Wei Zhao
>Priority: Major
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> h3. Problem Desciption
> Currently some modules of Tinkerpop are using the same dependency. However, 
> some of these dependencies' versions are not centrally managed and therefore 
> cause discrepancy.
> I found the following dependencies with different versions in different 
> modules.
> {code:java}
> Dependency org.xerial.snappy:snappy-java:jar has inconsistent versions.
> Dependency {groupId=org.xerial.snappy, artifactId=snappy-java, 
> version=1.1.8.4}
> /spark-gremlin
> Dependency {groupId=org.xerial.snappy, artifactId=snappy-java, 
> version=1.1.8.2}
> /hadoop-gremlin
> -
> Dependency com.fasterxml.jackson.core:jackson-databind:jar has inconsistent 
> versions.
> Dependency {groupId=com.fasterxml.jackson.core, 
> artifactId=jackson-databind, version=2.15.2}
> /gremlin-shaded
> Dependency {groupId=com.fasterxml.jackson.core, 
> artifactId=jackson-databind, version=2.13.5}
> /spark-gremlin
> /hadoop-gremlin
> -
> {code}
> h3. Possible Outcome:
> This increases the maintenance workload and may lead to dependency conflict 
> for downstream projects. So it's better to align the versions of the 
> dependencies if the discrepancy is not intentional.
> h3. Possible Solution
> Align the versions of the dependencies to ensure consistency and avoid 
> possible conflicts. And if it's possible, manage the versions of the 
> dependencies centrally.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3082) Tinkerpop hardcoded the Spark AppName

2024-06-04 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3082:
---

ministat commented on code in PR #2634:
URL: https://github.com/apache/tinkerpop/pull/2634#discussion_r1626069017


##
spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/SparkTest.java:
##
@@ -51,6 +51,15 @@
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
 public class SparkTest extends AbstractSparkTest {
+@Test
+public void testCustomizedSparkAppName() {
+   final String appName = "SparkAppNameTest";
+   final org.apache.spark.SparkConf sparkConfiguration = new 
org.apache.spark.SparkConf();

Review Comment:
   No special purpose. My impression is many "import" sometimes brings trouble 
and confusion to the current file namespace, like the 
org.apache.commons.configuration2.Configuration and 
org.apache.commons.configuration.Configuration. So, I tried to avoid that. In 
addition, org.apache.spark.SparkConf is not too long and not impact the reading.



##
spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/SparkTest.java:
##
@@ -51,6 +51,15 @@
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
 public class SparkTest extends AbstractSparkTest {
+@Test
+public void testCustomizedSparkAppName() {

Review Comment:
   Good idea. I'll add one.





> Tinkerpop hardcoded the Spark AppName
> -
>
> Key: TINKERPOP-3082
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3082
> Project: TinkerPop
>  Issue Type: Improvement
>Affects Versions: 3.7.2
>Reporter: Redriver
>Priority: Major
> Attachments: Screenshot 2024-06-03 at 16.14.17.png
>
>
> When I run gremlin through SparkGraphComputer, the SparkUI always displays 
> the Spark App as "[Apache TinkerPop's 
> Spark-Gremlin|http://hdc49-mcc10-01-0510-3405-002-tess0097.stratus.rno.ebay.com:4040/]";
>  (see 
> https://github.com/apache/tinkerpop/blob/master/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/Spark.java#L51)
>  which confused users if I run multiple gremlin with SparkGraphComputer.
> It should allow override the Spark App name if user wants to. If user does 
> not specify the Spark app name, we can provide the default one.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3081) When using authentication, evaluationTimeout is ignored

2024-06-03 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3081:
---

kenhuuu commented on code in PR #2622:
URL: https://github.com/apache/tinkerpop/pull/2622#discussion_r1625347826


##
gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WebSocketAuthorizationHandler.java:
##
@@ -68,11 +68,19 @@ public void channelRead(final ChannelHandlerContext ctx, 
final Object msg) {
 final Bytecode bytecode = (Bytecode) 
requestMessage.getArgs().get(Tokens.ARGS_GREMLIN);
 final Map aliases = (Map) requestMessage.getArgs().get(Tokens.ARGS_ALIASES);
 final Bytecode restrictedBytecode = 
authorizer.authorize(user, bytecode, aliases);
-final RequestMessage restrictedMsg = 
RequestMessage.build(Tokens.OPS_BYTECODE).
+final RequestMessage.Builder restrictedMsgBuilder = 
RequestMessage.build(Tokens.OPS_BYTECODE).

Review Comment:
   I think you could clean this up a little by using the from() 
(https://github.com/apache/tinkerpop/blob/3.6-dev/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/message/RequestMessage.java#L107)
 to make a copy of the old RequestMessage and then just override the 
ARGS_GREMLIN with restrictedBytecode.





> When using authentication, evaluationTimeout is ignored
> ---
>
> Key: TINKERPOP-3081
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3081
> Project: TinkerPop
>  Issue Type: Bug
>Reporter: Lyndon Bauto
>Assignee: Lyndon Bauto
>Priority: Major
>
> Using g.with("evaluationTimeout"). ignored evaluationTimeout when 
> authentication is enabled.
>  
> Relevant discord thread: 
> https://discord.com/channels/838910279550238720/1245462911728615629/1245462911728615629



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3082) Tinkerpop hardcoded the Spark AppName

2024-06-03 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3082:
---

kenhuuu commented on PR #2634:
URL: https://github.com/apache/tinkerpop/pull/2634#issuecomment-2146604853

   VOTE +1 pending minor fixes.




> Tinkerpop hardcoded the Spark AppName
> -
>
> Key: TINKERPOP-3082
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3082
> Project: TinkerPop
>  Issue Type: Improvement
>Affects Versions: 3.7.2
>Reporter: Redriver
>Priority: Major
> Attachments: Screenshot 2024-06-03 at 16.14.17.png
>
>
> When I run gremlin through SparkGraphComputer, the SparkUI always displays 
> the Spark App as "[Apache TinkerPop's 
> Spark-Gremlin|http://hdc49-mcc10-01-0510-3405-002-tess0097.stratus.rno.ebay.com:4040/]";
>  (see 
> https://github.com/apache/tinkerpop/blob/master/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/Spark.java#L51)
>  which confused users if I run multiple gremlin with SparkGraphComputer.
> It should allow override the Spark App name if user wants to. If user does 
> not specify the Spark app name, we can provide the default one.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3082) Tinkerpop hardcoded the Spark AppName

2024-06-03 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3082:
---

kenhuuu commented on PR #2634:
URL: https://github.com/apache/tinkerpop/pull/2634#issuecomment-2146604577

   Could you also please add a short note to the CHANGELOG?




> Tinkerpop hardcoded the Spark AppName
> -
>
> Key: TINKERPOP-3082
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3082
> Project: TinkerPop
>  Issue Type: Improvement
>Affects Versions: 3.7.2
>Reporter: Redriver
>Priority: Major
> Attachments: Screenshot 2024-06-03 at 16.14.17.png
>
>
> When I run gremlin through SparkGraphComputer, the SparkUI always displays 
> the Spark App as "[Apache TinkerPop's 
> Spark-Gremlin|http://hdc49-mcc10-01-0510-3405-002-tess0097.stratus.rno.ebay.com:4040/]";
>  (see 
> https://github.com/apache/tinkerpop/blob/master/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/Spark.java#L51)
>  which confused users if I run multiple gremlin with SparkGraphComputer.
> It should allow override the Spark App name if user wants to. If user does 
> not specify the Spark app name, we can provide the default one.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (TINKERPOP-3082) Tinkerpop hardcoded the Spark AppName

2024-06-03 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on TINKERPOP-3082:
---

kenhuuu commented on code in PR #2634:
URL: https://github.com/apache/tinkerpop/pull/2634#discussion_r1625338383


##
spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/SparkTest.java:
##
@@ -51,6 +51,15 @@
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
 public class SparkTest extends AbstractSparkTest {
+@Test
+public void testCustomizedSparkAppName() {

Review Comment:
   Minor nit: could add a similar test to make sure that the default name is 
"Apache TinkerPop's Spark-Gremlin"





> Tinkerpop hardcoded the Spark AppName
> -
>
> Key: TINKERPOP-3082
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3082
> Project: TinkerPop
>  Issue Type: Improvement
>Affects Versions: 3.7.2
>Reporter: Redriver
>Priority: Major
> Attachments: Screenshot 2024-06-03 at 16.14.17.png
>
>
> When I run gremlin through SparkGraphComputer, the SparkUI always displays 
> the Spark App as "[Apache TinkerPop's 
> Spark-Gremlin|http://hdc49-mcc10-01-0510-3405-002-tess0097.stratus.rno.ebay.com:4040/]";
>  (see 
> https://github.com/apache/tinkerpop/blob/master/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/Spark.java#L51)
>  which confused users if I run multiple gremlin with SparkGraphComputer.
> It should allow override the Spark App name if user wants to. If user does 
> not specify the Spark app name, we can provide the default one.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


  1   2   3   4   5   6   7   8   9   10   >