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


##########
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/RangeGlobalStep.java:
##########
@@ -157,10 +163,26 @@ public void processAllStarts() {
 
     }
 
+    private AtomicLong getCounter(final Traverser.Admin<S> traverser) {
+        if (isInsideLoop()) {
+            final String counterKey = getCounterKey(traverser);
+            return loopCounters.computeIfAbsent(counterKey, k -> new 
AtomicLong(0L));
+        } else {
+            return this.singleCounter;
+        }
+    }
+
+    private boolean isInsideLoop() {

Review Comment:
   I would 100% agree if it were a public method however since it is private 
one I think the risk is minimal. Doesn't hurt to add a comment though so I'll 
do that



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to