Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
address comment
  • Loading branch information
poorbarcode committed Oct 23, 2025
commit dcc1861971b09d9320e02a99ba9f112fa6da4885
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,11 @@ private void openWithMetadata(Versioned<LedgerMetadata> versionedMetadata) {
}

// get the ledger metadata back
final boolean watchImmediately = !doRecovery || metadata.isClosed();
// The cases that need to register listener immediately are:
// 1. The ledger is not in recovery opening, which is the original case.
// 2. The ledger is closed and need to keep update metadata. There is other cases that do not need to
// register listener. e.g. The ledger is opening by Auto-Recovery component.
final boolean watchImmediately = !doRecovery || (keepUpdateMetadata && metadata.isClosed());
try {
// The ledger metadata may be modified even if it has been closed, because the auto-recovery component may
// rewrite the ledger's metadata. Keep receiving a notification from ZK to avoid the following issue: an
Expand Down