ZOOKEEPER-4915: Default znode.container.maxNeverUsedIntervalMs to 5 minutes#2248
Conversation
…inutes This will delete container nodes that never had any children after approximately 5 minutes. > Given this property, you should be prepared to get `KeeperException.NoNodeException` > when creating children inside of this container node Container nodes are supposed to be deleted after all children deleted, so from client's perspective this change has no harm. And also, it leaves no unused nodes in data tree.
bd7ca89 to
3121b0d
Compare
| zkDb, requestProcessor, | ||
| Integer.getInteger("znode.container.checkIntervalMs", (int) TimeUnit.MINUTES.toMillis(1)), | ||
| Integer.getInteger("znode.container.maxPerMinute", 10000), | ||
| Long.getLong("znode.container.maxNeverUsedIntervalMs", TimeUnit.MINUTES.toMillis(5)) |
There was a problem hiding this comment.
The default 5-minute cleanup is a breaken change and is not recommended i think.
There was a problem hiding this comment.
How does it break things ? Container nodes with no children are supposed to be deleted.
|
@anmolnar Thank you for reviewing! Test added in fixup commit. |
Test only validates the default configuration. Why don't you make a test which creates a container node, waits and validates it has been deleted. |
|
Now I see it. Previously the default value was indefinite, but you change it to 5 minutes in this patch. Okay, let's do this. |
This will delete container nodes that never had any children after approximately 5 minutes.
Container nodes are supposed to be deleted after all children deleted, so from client's perspective this change has no harm. And also, it leaves no unused nodes in data tree.