Repository navigation
Reset topology-refresh in-progress flag on synchronous exception - #3817
Merged
a-TODO-rov merged 1 commit intoJul 3, 2026
Merged
Conversation
ClusterTopologyRefreshTask only cleared its in-progress flag inside the whenComplete callback of the reload stage. If reloadTopologyAsync.get() threw synchronously instead of returning a stage, the catch block logged the error but left the flag set, permanently disabling further topology refreshes for the client.
|
Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset. In case there are security findings, they will be communicated to you as a comment inside the PR. Hope you’ll enjoy using Jit. Questions? Comments? Want to learn more? Get in touch with us. |
a-TODO-rov
pushed a commit
that referenced
this pull request
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ClusterTopologyRefreshTask only cleared its in-progress flag inside the
whenCompletecallback of the reload stage.If
reloadTopologyAsync.get()throws synchronously before returning a stage, the catch block logs the error but leaves the flag set. That can cause later topology refresh attempts to be skipped because the in-progress guard remains true.This change resets the flag in the synchronous exception path as well.
Added a unit test that verifies:
refreshPartitionsAsync()throws synchronouslyFixes #3730
Note
Low Risk
Small, localized fix to error handling in cluster topology refresh with a matching unit test; no auth or data-path changes.
Overview
Fixes a bug where cluster topology refresh could get stuck if
refreshPartitionsAsync()failed before returning aCompletionStage.ClusterTopologyRefreshTaskonly cleared its in-progress guard inwhenComplete. A synchronous throw fromreloadTopologyAsync.get()was logged but left the flag set, so later refreshes were skipped with “already in progress.”The catch path now calls
set(false)so the guard matches async failure handling. A unit test asserts the flag clears after a sync throw and a secondrun()can callrefreshPartitionsAsync()again.Reviewed by Cursor Bugbot for commit b1b09d0. Bugbot is set up for automated code reviews on this repo. Configure here.