Repository navigation
Document bounded pool waits for cluster pipelines - #4564
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit c0e7984. Configure here.
|
@lh0156 |
b812409 to
b0120ce
Compare
|
Not sure there is a reliable way of detecting a deadlock. I think having a dedicated client with a configured |
b0120ce to
c49c001
Compare
|
Thanks for the guidance. I reworked this PR into a documentation-only change. It now explains that ClusterPipeline retains per-node connections until sync or close, recommends a dedicated client with an appropriately sized pool and a finite maxWait, and suggests single-shard pipelines where possible. There is no runtime behavior or pool-semantics change anymore. @ggivo, could you take another look when you have a chance? |

Documents how
ClusterPipelineretains per-node connections untilsync()orclose(), and how concurrent multi-node pipelines can wait indefinitely when the pool uses its default unbounded wait. The guide now recommends a dedicated cluster client with a pool sized for expected concurrency and a finitemaxWait, plus single-shard pipelines where possible.This follows the maintainer guidance on #4557 without changing cluster pipeline acquisition semantics.
Refs #4557.
Note
Low Risk
Documentation-only change with no code or configuration defaults modified.
Overview
Adds a Pipelining subsection, Avoiding pool waits with cluster pipelines, to
docs/advanced-usage.md.It documents that
ClusterPipelineholds a borrowed connection on each targeted node untilsync()orclose(), and that overlapping multi-node pipelines with small per-node pools and default unbounded pool wait can deadlock or hang indefinitely.The guide recommends a dedicated
RedisClusterClientwithConnectionPoolConfigsized for expected concurrent pipelines and a finitemaxWait, includes a try-with-resources example, and advises single-shard pipelines when possible. No runtime or API changes.Reviewed by Cursor Bugbot for commit 7838c26. Bugbot is set up for automated code reviews on this repo. Configure here.