apache / bookkeeper

Apache BookKeeper - a scalable, fault tolerant and low latency storage service optimized for append-only workloads
https://bookkeeper.apache.org/
Apache License 2.0
1.9k stars 901 forks source link

Provide a #forceRecovery method in BookKeeperAdmin #783

Open sijie opened 6 years ago

sijie commented 6 years ago

FEATURE REQUEST

  1. Please describe the feature you are requesting.

Currently distributedlog tool provides a command for force-recovering a ledger (even the ledger is already closed). distributedlog achieves this by using some package private method in LedgerHandle. It would be good to add this method in BookKeeperAdmin for administration. so distributedlog can get rid of using package private method in LedgerHandle.

  1. Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue?

should-have

  1. Provide any additional detail on your proposed use case for this feature.

N/A

ivankelly commented 6 years ago

Why does it need to do it if the ledger is already closed?

sijie commented 6 years ago

@ivankelly this was an admin tool to handle production issues when there was bug in bookkeeper recovery.

ivankelly commented 6 years ago

👍 out of interest, do you recall what the bug was?

sijie commented 6 years ago

@ivankelly it was the bug in ledger recovery - it recorded the wrong last entry id. it was 2-3 years ago, I can't remember what exactly was that.