You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hugegraph.apache.org by GitBox <gi...@apache.org> on 2022/08/30 15:19:10 UTC

[GitHub] [incubator-hugegraph] javeme commented on a diff in pull request #1932: close LimitIterator when reach limit (#410)

javeme commented on code in PR #1932:
URL: https://github.com/apache/incubator-hugegraph/pull/1932#discussion_r958619981


##########
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendEntryIterator.java:
##########
@@ -52,6 +52,11 @@ public BackendEntryIterator(Query query) {
     @Override
     public boolean hasNext() {
         if (this.reachLimit()) {
+            try {
+                this.close();

Review Comment:
   seems we don't need to close stream Iterators manually



-- 
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: commits-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org