apache / apache/curator

[CURATOR-570] Excessive calls to ZooKeeper.updateServerList (which can result in session death)

Open
#1,089 21 comments 0 reactions 0 assignees View on GitHub
bug imported-jira-issue
Dominant language
Java
Stars
3.2k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

On suspend and reconnect, Curator calls ZooKeeper.updateServerList via ConnectionState.checkState --> ConnectionState.handleNewConnectionString.  In addition, recipes may be triggered by this as well, and they too make calls ZooKeeper.updateServerList via ConnectState.checkTimeouts --> ConnectionState.handleNewConnectionString.

This happens even though the connection string has not actually changed.

Due to ZOOKEEPER-3825, this can cause the connection to be closed immediately.  On its own this would be perceived as a glitch.  But due to the Curator-induced calls, what we see is a cycle of SUSPENDED/RECONNECTED, until eventually the session dies and a new session is recreated.

Based on the source code (at time of writing), ZooKeeper.updateServerList is not intended to be called frequently like this.

---
Originally reported by ryarran, imported from: Excessive calls to ZooKeeper.updateServerList (which can result in session death)


  • status: Open
  • priority: Major
  • resolution: Unresolved
  • imported: 2025-01-21

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.