You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/10/17 06:11:29 UTC

[GitHub] [pulsar] codelipenghui commented on a change in pull request #8284: Fix Broker enters an infinite loop in ManagedLedgerImpl.asyncReadEntries

codelipenghui commented on a change in pull request #8284:
URL: https://github.com/apache/pulsar/pull/8284#discussion_r506822092



##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
##########
@@ -1618,6 +1616,8 @@ private void internalReadFromLedger(ReadHandle ledger, OpReadEntry opReadEntry)
                         ledger.getId(), lastEntryInLedger, firstEntry);
             }
 
+            opReadEntry.updateReadPosition(opReadEntry.readPosition);

Review comment:
       Looks like it's better to move it to 
   
   ```
   if (currentLedger == null || ledger.getId() != currentLedger.getId()) {
          ...
   } else {
         opReadEntry.updateReadPosition(opReadEntry.readPosition);
   }
   ```




----------------------------------------------------------------
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.

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