You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/02/28 13:34:47 UTC

[GitHub] ivankelly commented on a change in pull request #1218: Support LacPiggyback, LongPoll and ExplicitLac in db ledger storage

ivankelly commented on a change in pull request #1218: Support LacPiggyback, LongPoll and ExplicitLac in db ledger storage
URL: https://github.com/apache/bookkeeper/pull/1218#discussion_r171240354
 
 

 ##########
 File path: bookkeeper-server/src/test/java/org/apache/bookkeeper/util/TestUtils.java
 ##########
 @@ -52,4 +60,21 @@ public static boolean hasLogFiles(File ledgerDirectory, boolean partial, Integer
         }
         return result;
     }
+
+    public static void waitUtilLacUpdated(ReadHandle rh, long newLac) throws Exception {
+        long lac = rh.getLastAddConfirmed();
+        while (lac < newLac) {
+            TimeUnit.MILLISECONDS.sleep(20);
+            lac = rh.readLastAddConfirmed().get();
+        }
+    }
+
+    public static long waitUtilExplicitLacUpdated(LedgerHandle rh, long newLac) throws Exception {
 
 Review comment:
   Why are you using ReadHandle for one and LedgerHandle for the other?
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services