Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance client to do reconnect on max connections from server #935

Merged
merged 4 commits into from Mar 25, 2022

Conversation

tbeets
Copy link
Contributor

@tbeets tbeets commented Mar 25, 2022

The client will attempt reconnect when maximum connections exceeded error is sent by server immediately prior to a hard disconnect rather than close without reconnect attempt(s).

This is additive to existing re-connection on stale connection from server, auth and perm errors, and read loop errors (such as network disconnect).

Copy link
Member

@kozlovic kozlovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reasons, the same tests are failing in push/PR.. locally they pass for me, wonder if this is just a coincidence or caused by this PR. Once you make the changes I requested, we will see if the same tests fail again.

nats_test.go Outdated Show resolved Hide resolved
nats_test.go Outdated Show resolved Hide resolved
nats_test.go Outdated Show resolved Hide resolved
nats_test.go Outdated Show resolved Hide resolved
nats_test.go Outdated Show resolved Hide resolved
nats_test.go Outdated Show resolved Hide resolved
nats_test.go Outdated Show resolved Hide resolved
nats_test.go Outdated Show resolved Hide resolved
@kozlovic
Copy link
Member

@tbeets Discard my comment about same test failing in push/pr since you have only a PR run.. there were 2 tests (but different), one in 1.17 and one in 1.16 (the code coverage run). I am going to recycle to see if those were flappers or not.

@kozlovic
Copy link
Member

hum... got this test failure again:

=== RUN   TestJetStreamClusterStreamLeaderChangeClientErr
    js_test.go:6334: Unexpected error: nats: raft: not leader
--- FAIL: TestJetStreamClusterStreamLeaderChangeClientErr (6.89s)

nats_test.go Outdated Show resolved Hide resolved
nats_test.go Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Mar 25, 2022

Coverage Status

Coverage increased (+0.04%) to 85.121% when pulling 06441fe on tbeets:main into e0e03e3 on nats-io:main.

@tbeets tbeets requested a review from kozlovic March 25, 2022 23:09
Copy link
Member

@kozlovic kozlovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tbeets tbeets merged commit 5753a5f into nats-io:main Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants