Skip to content

tpu-client-next: set connection retry value to 1 for first retry#9581

Merged
KirillLykov merged 1 commit intoanza-xyz:masterfrom
KirillLykov:klykov/fix-retry-counter
Dec 17, 2025
Merged

tpu-client-next: set connection retry value to 1 for first retry#9581
KirillLykov merged 1 commit intoanza-xyz:masterfrom
KirillLykov:klykov/fix-retry-counter

Conversation

@KirillLykov
Copy link

Problem

Fix bug with incorrect retry counter used for re-establishing connections.
This value is used like the follows:

                   ConnectionState::Retry(num_reconnects) => {
                        if *num_reconnects > self.max_reconnect_attempts {
                            error!(
                                "Failed to establish connection to {}: reached max reconnect \
                                 attempts",
                                self.peer
                            );
                            self.connection = ConnectionState::Closing;
                            continue;
                        }
                        sleep(RETRY_SLEEP_INTERVAL).await;
                        self.reconnect(*num_reconnects).await;
                    }

So if max_reconnect_attempts == 0 we get 0 > 0 and try reconnecting, which is not what expected.

Summary of Changes

@KirillLykov KirillLykov added the v3.1 Backport to v3.1 branch label Dec 16, 2025
@mergify
Copy link

mergify bot commented Dec 16, 2025

Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis.

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.5%. Comparing base (4a04cba) to head (c1b1442).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #9581     +/-   ##
=========================================
- Coverage    82.5%    82.5%   -0.1%     
=========================================
  Files         901      901             
  Lines      323326   323326             
=========================================
- Hits       267043   267038      -5     
- Misses      56283    56288      +5     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KirillLykov KirillLykov added this pull request to the merge queue Dec 17, 2025
Merged via the queue into anza-xyz:master with commit 2dc0fac Dec 17, 2025
48 checks passed
@KirillLykov KirillLykov deleted the klykov/fix-retry-counter branch December 17, 2025 15:17
mergify bot pushed a commit that referenced this pull request Dec 17, 2025
set connection retry value to 1 for first retry

(cherry picked from commit 2dc0fac)
KirillLykov added a commit that referenced this pull request Dec 18, 2025
…y (backport of #9581) (#9616)

tpu-client-next: set connection retry value to 1 for first retry (#9581)

set connection retry value to 1 for first retry

(cherry picked from commit 2dc0fac)

Co-authored-by: kirill lykov <lykov.kirill@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v3.1 Backport to v3.1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants