Open
Description
FEATURE REQUEST
- Please describe the feature you are requesting.
There is a "gc" logic in removeLedgerMetadata
to delete the parent znodes recursively. The logic is not a problem. However it will introduce a lot of verbose logging from zookeeper because the parent znode is not empty at most of the time.
2017-12-21 09:18:04,768 - INFO - [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@880] - Got user-level KeeperException when processing sessionid:0x10072c2295d000c type:delete cxid:0x147 zxid:0x251 txntype:-1 reqpath:n/a Error Path:/messaging/bookkeeper/ledgers/00/0000 Error:KeeperErrorCode = Directory not empty for /messaging/bookkeeper/ledgers/00/0000
The problem is we are using an "optimistic" on deleting. We should check if the parent is empty or not, before deleting. It is also more scalable to check before delete, because check is a read operation, while delete is a write operation which has to go to zk leader.
- 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
- Provide any additional detail on your proposed use case for this feature.
N/A