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 the following if ... else ...
   
   ```
   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:
[email protected]


Reply via email to