sijie commented on issue #1168: Fix TestBKSyncLogReader URL: https://github.com/apache/bookkeeper/pull/1168#issuecomment-370101837 > Why do we remove the sleep between read? What if the polling speed is faster than the read ahead reading speed, and when we try to read the 21st record, we get null, but read ahead do get the record after the assert is done? A good point. the `sleep` was used for polling next readahead entry id. I have rewritten the test case to eliminate polling next readahead entry id. The approach I am using is using blockingRead to read until we finish reading 20 records. `readNext(false)` is a blocking call, which will wait up to the wait time configured at the configuration. https://github.com/apache/bookkeeper/blob/master/stream/distributedlog/core/src/main/java/org/apache/distributedlog/BKSyncLogReader.java#L145
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
