You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "mattisonchao (via GitHub)" <gi...@apache.org> on 2023/05/14 15:49:20 UTC

[GitHub] [bookkeeper] mattisonchao commented on a diff in pull request #3955: Fix npe when iterate pendingLedgersUpdates and pendingDeletedLedgers.

mattisonchao commented on code in PR #3955:
URL: https://github.com/apache/bookkeeper/pull/3955#discussion_r1193169520


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/LedgerMetadataIndex.java:
##########
@@ -300,6 +300,9 @@ public void flush() throws IOException {
         int updatedLedgers = 0;
         while (!pendingLedgersUpdates.isEmpty()) {

Review Comment:
   If this method is not thread-safe, perhaps we could use the `poll` method and determine if it is `null` to implement loop control.



-- 
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@bookkeeper.apache.org

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