Skip to content

Commit 4cd7299

Browse files
datvong-wmdougwilson
authored andcommitted
docs: document PoolCluster disconnect behavior
closes #2224
1 parent b6546a0 commit 4cd7299

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Readme.md

+7
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,13 @@ terminated, an existing connection object cannot be re-connected by design.
648648
With Pool, disconnected connections will be removed from the pool freeing up
649649
space for a new connection to be created on the next getConnection call.
650650

651+
With PoolCluster, disconnected connections will count as errors against the
652+
related node, incrementing the error code for that node. Once there are more than
653+
`removeNodeErrorCount` errors on a given node, it is removed from the cluster.
654+
When this occurs, the PoolCluster may emit a `POOL_NONEONLINE` error if there are
655+
no longer any matching nodes for the pattern. The `restoreNodeTimeout` config can
656+
be set to restore offline nodes after a given timeout.
657+
651658
## Performing queries
652659

653660
The most basic way to perform a query is to call the `.query()` method on an object

0 commit comments

Comments
 (0)