[ 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) | <details><summary>Additional details and impacted files</summary> ```diff @@ Coverage Diff @@ ## 3.7-dev #2757 +/- ## ============================================= + Coverage 76.14% 76.41% +0.27% - Complexity 13152 13203 +51 ============================================= Files 1084 1060 -24 Lines 65160 61439 -3721 Branches 7285 7315 +30 ============================================= - Hits 49616 46950 -2666 + Misses 12839 11973 -866 + Partials 2705 2516 -189 ``` </details> [: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 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',300000L) > .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: > 300000L)) > .withStrategies(new > org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout: > 300000L, a: (int) 1)) > .withStrategies(new > org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout: > 300000L, a: (int) 1, b: (int) 2)) > .withStrategies(new > org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy(evaluationTimeout: > 300000L, 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: > 300000L, 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)