Commit 3ffe64a
Clarify ClusterClient ownership contract
Expand ConnectionPool.__init__ docstring to state who closes the
cluster, whether sharing across pools is safe, and what pool.close()
actually does. Previous docstring said only "Externally-owned
ClusterClient" which left three questions unanswered:
- Does pool.close() close the cluster? Answer: no.
- May one cluster back many pools? Answer: yes.
- Is out-of-pool use of the cluster safe? Answer: yes, each
leader-query opens a short-lived socket that does not contend with
pool checkout.
Also clarifies that when the pool constructs its own cluster (from
node_store= or addresses=), pool.close() still does not close it —
leader-query sockets are short-lived, and the NodeStore is
caller-owned.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 3cd8900 commit 3ffe64a
1 file changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
78 | 90 | | |
79 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
80 | 96 | | |
81 | 97 | | |
82 | 98 | | |
| |||
0 commit comments