poorbarcode commented on code in PR #24722:
URL: https://github.com/apache/pulsar/pull/24722#discussion_r2339462745


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -1878,10 +1878,38 @@ protected synchronized void 
updateLedgersIdsComplete(@Nullable LedgerHandle orig
         }
     }
 
+    void ledgerAddFailedDueToConcurrentlyModified(final LedgerHandle 
currentLedger) {
+        bookKeeper.asyncOpenLedger(currentLedger.getId(), digestType, 
config.getPassword(), (rc, lh, ctx) -> {
+            if (rc == Code.OK) {
+                log.warn("[{}] Successfully opened ledger {} to check the last 
add confirmed position when the ledger"
+                    + " was concurrent modified(it is an unexpected behaviour, 
which happens when the load-balancer"
+                    + " does not work as expected). The add confirmed position 
in memory is {}, and the value"

Review Comment:
   Removed



##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -1878,10 +1878,38 @@ protected synchronized void 
updateLedgersIdsComplete(@Nullable LedgerHandle orig
         }
     }
 
+    void ledgerAddFailedDueToConcurrentlyModified(final LedgerHandle 
currentLedger) {
+        bookKeeper.asyncOpenLedger(currentLedger.getId(), digestType, 
config.getPassword(), (rc, lh, ctx) -> {
+            if (rc == Code.OK) {
+                log.warn("[{}] Successfully opened ledger {} to check the last 
add confirmed position when the ledger"
+                    + " was concurrent modified(it is an unexpected behaviour, 
which happens when the load-balancer"
+                    + " does not work as expected). The add confirmed position 
in memory is {}, and the value"
+                    + " stored in metadata store is {}. When you get this log, 
the latest several entries may be"
+                    + " repeated.", name, lh.getId(), 
currentLedger.getLastAddConfirmed(), lh.getLastAddConfirmed());

Review Comment:
   Removed



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to