Fixes the failed node detector copy behavior in RedisClientConfig.#7226
Fixes the failed node detector copy behavior in RedisClientConfig.#7226rahulrane50 wants to merge 1 commit into
RedisClientConfig.#7226Conversation
|
Direction looks right to me. One suggestion: this PR is really doing two independent things, and it'd be worth either calling them out explicitly or splitting into two PRs.
These are separable — the copy() fix is valuable regardless, and the address tagging only becomes meaningful once detectors are per-node, so it reads more like a follow-up built on top of (1). Splitting (or at least separating the commits) would make the bug fix easier to review and backport independently of the instrumentation. Either way, the description should make the distinction explicit. |
f9c2b9a to
5521b08
Compare
RedisClientConfig.
5521b08 to
58e0fe2
Compare
|
Java CI failed |
Signed-off-by: Rahul Rane <[email protected]>
58e0fe2 to
6deff59
Compare
|
thanks @mrniko fixed the checstyle failure for CI. can you help me approve another java CI workflow? |
|
@mrniko it's weird. I retried exact same CI job locally and it ran successfully. Seems like that version got published later in maven repository and also this whole failure doesn't look like related to above PR. I'm not able to rerun it but can you help take a look or re-run? thanks! |
Summary
Fixes the failed node detector copy behavior in
RedisClientConfig. [issue]RedisClientConfigcreates per-node client configs, but previously reused the sameFailedNodeDetectorinstance across copied configs. Since the built-in detectors keepruntime failure state, failures from one node could contribute to another node's failure window.
This PR adds
FailedNodeDetector.copy()and makes the built-in detectors return new instances with the same configuration but independent runtime state.RedisClientConfignow uses the copy when cloning config.Test:
JAVA_HOME=/Library/Java/JavaVirtualMachines/amazon-corretto-21.jdk/Contents/Home mvn -pl redisson -Punit-test -Dmaven.compiler.testRelease=21 -Dmaven.compiler.testSource=21 -Dmaven.compiler.testTarget=21 -Dtest=org.redisson.client.FailedNodeDetectorCopyTest test