You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/02/21 10:34:09 UTC

[GitHub] [ignite-3] SammyVimes commented on a change in pull request #675: IGNITE-16584 Fix metastorage cursor wrong order

SammyVimes commented on a change in pull request #675:
URL: https://github.com/apache/ignite-3/pull/675#discussion_r810989204



##########
File path: modules/metastorage-server/src/main/java/org/apache/ignite/internal/metastorage/server/persistence/WatchCursor.java
##########
@@ -125,50 +125,41 @@ public boolean hasNext() {
                 storage.lock().readLock().lock();
 
                 try {
-                    if (nextRetRev != -1) {
-                        // Next revision is already calculated and is not -1, meaning that there is a set of keys
-                        // matching the revision and the predicate.
+                    if (currentHasNext) {
                         return true;
                     }
 
-                    while (true) {
-                        long curRev = lastRetRev + 1;
-
-                        byte[] revisionPrefix = longToBytes(curRev);
-
-                        boolean empty = true;
+                    if (!nativeIterator.isValid()) {
+                        try {
+                            nativeIterator.refresh();

Review comment:
       Discussed in private




-- 
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: notifications-unsubscribe@ignite.apache.org

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