-
Notifications
You must be signed in to change notification settings - Fork 242
Description
Describe the bug
The issue is related to ZooKeeper's TTL (Time-To-Live) node functionality and specifically how it behaves in the embedded ZooKeeper environment used in tests.
In a normal ZooKeeper deployment, a background ContainerManager thread runs periodically to clean up expired TTL nodes. However, in the embedded ZooKeeper used for testing, this background thread doesn't appear to be functioning properly. The ContainerManager is designed to run on a configurable schedule (default is 60 seconds), but in the test environment, this cleanup process doesn't happen.
To Reproduce
Trigger testSyncCreateWithTTL() in debug mode while setting up a breakpoint here, then analyse the znode in zk. It will never be cleaned up.
Expected behavior
The znodes should get cleaned up in the integration tests once the TTL expires
Additional context
The tests that target PERSISTENT_WITH_TTL are incomplete. They dont check if the znode is removed or they just remove the znode manually.