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

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

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

   ## 
[Codecov](https://app.codecov.io/gh/apache/tinkerpop/pull/3688?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 77.08%. Comparing base 
([`4722890`](https://app.codecov.io/gh/apache/tinkerpop/commit/4722890ed831ba4f71c3916b5e6eafcf85439345?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`bbea975`](https://app.codecov.io/gh/apache/tinkerpop/commit/bbea9756dbe7df29a9f569788c13625376370771?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 131 commits behind head on 3.7-dev.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##             3.7-dev    #3688      +/-   ##
   =============================================
   + Coverage      75.49%   77.08%   +1.58%     
   =============================================
     Files           1092       28    -1064     
     Lines          67208     5337   -61871     
     Branches        7391        0    -7391     
   =============================================
   - Hits           50742     4114   -46628     
   + Misses         13837     1020   -12817     
   + Partials        2629      203    -2426     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by 
Harness](https://app.codecov.io/gh/apache/tinkerpop/pull/3688?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).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test 
Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, 
report on failures, and find test suite problems.
   - :package: [JS Bundle 
Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save 
yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>




> loops() quietly overflows
> -------------------------
>
>                 Key: TINKERPOP-3283
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-3283
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.7.6, 3.8.1
>            Reporter: Cole Greer
>            Priority: Major
>
> The `loops()` step is ultimately backed by a `LabelledCounter`, which tracks 
> the loop count as a `short` 
> (https://github.com/apache/tinkerpop/blob/519a7be1576c6ccc7f028382c108f02933b1140b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/util/LabelledCounter.java#L30).
> There is no overflow protection on this count, which can lead to some 
> undesirable behaviours around the boundary of 32767 (short max):
> {code:java}
> gremlin> g.inject(0).repeat(loops()).emit().times(32767).count()
> ==>32767
> gremlin> g.inject(0).repeat(loops()).emit().times(32768).count()
> //hung, as the loop counter overflows before reaching 32768
> gremlin> g.inject(0).repeat(addV('TestNode').
>     property(id, constant('TID-').concat(loops().asString())).
>     property('rid', loops()).
>     property('series','M').
>     property('uuid', 'ab0ae056-5d59-48df-a582-92c7c1bb9fcc')).
>     times(80000).iterate()
> Vertex with id already exists: TID-0
> Type ':help' or ':h' for help.
> Display stack trace? [yN]n
> gremlin> g.V()
> ==>v[TID--25318] // writes vertices with negative value ids after loops() 
> overflows
> ==>v[TID--25319]
> ==>v[TID--15991]
> ==>v[TID--15992]
> ==>v[TID--15990]
> ==>v[TID--25310]
> {code}
> The silent overflow leads to really unintuitive results and should be 
> considered a bug. This could be solved by adding some smart overflow 
> detection (either resulting in a clear exception or expansion to a new 
> long-counting traverser), or we could simply globally expand the counter to 
> be a long, and suffer the impact from the increased memory consumption. These 
> options should each be evaluated before implementing any fix.



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

Reply via email to