You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2021/01/15 12:31:23 UTC

[tinkerpop] branch master updated (4d53f37 -> 7fdbac2)

This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


    from 4d53f37  Merge branch '3.4-dev'
     new 46fc7f6  Revert "TINKERPOP-2490 RangeGlobalStep check high limit before retrieve next traverser"
     new 57e5f7d  Removed CHANGELOG entry for TINKERPOP-2490 after it was reopened CTR
     new 7fdbac2  Merge branch '3.4-dev'

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG.asciidoc                                 |  1 -
 .../traversal/step/filter/RangeGlobalStep.java     | 28 ++++++----------------
 2 files changed, 7 insertions(+), 22 deletions(-)


[tinkerpop] 01/03: Revert "TINKERPOP-2490 RangeGlobalStep check high limit before retrieve next traverser"

Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 46fc7f627c75e016688727551f211c432af5a0d3
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Fri Jan 15 07:24:43 2021 -0500

    Revert "TINKERPOP-2490 RangeGlobalStep check high limit before retrieve next traverser"
    
    This reverts commit 54d888f91ffe1e7a3a6754059807078e673f0635. EarlyLimitStrategy tests are failing for GraphComputer integration tests. CTR
---
 .../traversal/step/filter/RangeGlobalStep.java     | 28 ++++++----------------
 1 file changed, 7 insertions(+), 21 deletions(-)

diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/RangeGlobalStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/RangeGlobalStep.java
index 40bea1c..37441eb 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/RangeGlobalStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/RangeGlobalStep.java
@@ -59,20 +59,15 @@ public final class RangeGlobalStep<S> extends FilterStep<S> implements Ranging,
     }
 
     @Override
-    protected Traverser.Admin<S> processNextStart() {
-        // super.processNextStart() will first get next traverser before applying filtering logic.
-        // For RangeGlobalStep, if high limit is hit, there is no need to retrieve next traverser.
-        if (!this.bypass) {
-            this.filterHighRange();
-        }
-        return super.processNextStart();
-    }
-
-    @Override
     protected boolean filter(final Traverser.Admin<S> traverser) {
         if (this.bypass) return true;
 
-        this.filterHighRange();
+        if (this.high != -1 && this.counter.get() >= this.high) {
+            // This is a global step and this place would be the end of the traversal.
+            // Close the traversal to free up resources.
+            CloseableIterator.closeIterator(traversal);
+            throw FastNoSuchElementException.instance();
+        }
 
         long avail = traverser.bulk();
         if (this.counter.get() + avail <= this.low) {
@@ -100,15 +95,6 @@ public final class RangeGlobalStep<S> extends FilterStep<S> implements Ranging,
         return true;
     }
 
-    private void filterHighRange() {
-        if (this.high != -1 && this.counter.get() >= this.high) {
-            // This is a global step and this place would be the end of the traversal.
-            // Close the traversal to free up resources.
-            CloseableIterator.closeIterator(traversal);
-            throw FastNoSuchElementException.instance();
-        }
-    }
-
     @Override
     public void reset() {
         super.reset();
@@ -179,7 +165,7 @@ public final class RangeGlobalStep<S> extends FilterStep<S> implements Ranging,
 
     @Override
     public TraverserSet<S> nextBarrier() throws NoSuchElementException {
-        if (!this.starts.hasNext())
+        if(!this.starts.hasNext())
             throw FastNoSuchElementException.instance();
         final TraverserSet<S> barrier = (TraverserSet<S>) this.traversal.getTraverserSetSupplier().get();
         while (this.starts.hasNext()) {


[tinkerpop] 03/03: Merge branch '3.4-dev'

Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 7fdbac24fb9d3bcaec9a6b07a1197929a7b35e4b
Merge: 4d53f37 57e5f7d
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Fri Jan 15 07:31:04 2021 -0500

    Merge branch '3.4-dev'

 CHANGELOG.asciidoc                                 |  1 -
 .../traversal/step/filter/RangeGlobalStep.java     | 28 ++++++----------------
 2 files changed, 7 insertions(+), 22 deletions(-)



[tinkerpop] 02/03: Removed CHANGELOG entry for TINKERPOP-2490 after it was reopened CTR

Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 57e5f7d6523e7b72dc8395f84cc16a78de062571
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Fri Jan 15 07:29:47 2021 -0500

    Removed CHANGELOG entry for TINKERPOP-2490 after it was reopened CTR
---
 CHANGELOG.asciidoc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 34b1ad1..7e88e5e 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,7 +27,6 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Added `none()` step for all language variants.
 * Fixed bug in `PythonTranslator` which was improperly translating `Lambda` scripts.
 * Fixed bug in `GremlinDslProcessor` where certain return types in `TraversalSource` definitions were not generating code that would compile.
-* Checked high limit before retrieving next traverser in `RangeGlobalStep`.
 * Changed the default read and write timeout values for the `TornadoTransport` to `None` to disable it.
 * Bumped to Groovy 2.5.14.