lhotari commented on code in PR #24432:
URL: https://github.com/apache/pulsar/pull/24432#discussion_r2157134876
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -2980,7 +2980,15 @@ public void operationComplete(Void result, Stat stat) {
for (LedgerInfo ls : offloadedLedgersToDelete) {
log.info("[{}] Deleting offloaded ledger {} from
bookkeeper - size: {}", name, ls.getLedgerId(),
ls.getSize());
- asyncDeleteLedgerFromBookKeeper(ls.getLedgerId());
+
asyncDeleteLedgerFromBookKeeper(ls.getLedgerId()).thenAccept(__ -> {
+ log.info("[{}] Deleted and invalidated offloaded
ledger {} from bookkeeper - size: {}",
+ name, ls.getLedgerId(), ls.getSize());
+ invalidateReadHandle(ls.getLedgerId());
Review Comment:
Just wondering if invalidation should happen before deleting ledgers from
bookkeeper. Could there be a race condition if the invalidation happens after
deletion?
--
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]