Skip to content

Commit ec382a2

Browse files
datvong-wmdougwilson
authored andcommitted
docs: document PoolCluster disconnect behavior
closes #2224
1 parent d247eef commit ec382a2

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
@@ -650,6 +650,13 @@ terminated, an existing connection object cannot be re-connected by design.
650650
With Pool, disconnected connections will be removed from the pool freeing up
651651
space for a new connection to be created on the next getConnection call.
652652

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

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

0 commit comments

Comments
 (0)