[CURATOR-478] LeaderLatch accumulates additional watcher handlers
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
In the event of a connection reconnect, LeaderLatch calls reset():
Ultimately, this results in another call to getChildren(), which calls checkLeadership(), which registers another getData watch for the ephemeral leader record preceding our new leader record. However, the watch in place from before reset() is in place, and will trigger yet another watch in the event that the record it is watching gets deleted.
As such, the number of pending watchers (at least client side) will continue to increase each time the connection fails over.
Marked as trivial because I think it's unlikely these accumulate to the point that it's an issue, but it seems like it should at least be called out.
---
Originally reported by timcharper, imported from: LeaderLatch accumulates additional watcher handlers
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.