Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[pulsar-broker] close managed-ledgers before giving up bundle ownership to avoid bad zk-version #5599
We have seen multiple below occurrence where unloading topic doesn't complete and gets stuck. and broker gives up ownership after a timeout and closing ml-factory closes unclosed managed-ledger which corrupts metadata zk-version and topic owned by new broker keeps failing with exception:
right now, while unloading bundle: broker removes ownership of bundle after timeout even if topic's managed-ledger is not closed successfully and
This fix will make sure that broker closes managed-ledger before giving up bundle ownership to avoid below exception at new broker where bundle moves
@merlimat addressed your comments and renamed the flag with more meaningful name instead making it enum as enum doesn't seem appropriate to define this method behavior. can you please review it again or can you please let me know if you have any thought on it.