Skip to content

Added retries on creating the cassandra client. #6877

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

Merged
merged 2 commits into from
May 2, 2025

Conversation

jakobht
Copy link
Member

@jakobht jakobht commented May 2, 2025

What changed?
We now do 3 attempts to create the client, with exponential backoff using a retry policy.

Also removed deprecated mock clock and replaced with the new timeSource

Why?
We sometimes see trancient failures on creating the client, currently this causes the whole server to crash during startup, this adds a few retries before giving up

How did you test it?
Unit tests

Potential risks

Release notes

Documentation Changes

@jakobht jakobht force-pushed the retryCassClientCreation branch from d3b65c7 to 9b55315 Compare May 2, 2025 13:14
)

func TestNewCQLClientWithRetry(t *testing.T) {
mockClient, mockSession, mockClock := setUpMocks(t)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add

defer goleak.VerifyNone(t)

And not leak goroutines

Copy link
Member Author

Choose a reason for hiding this comment

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

Added and fixed the go-routine. It's relatively big change to the test, so please re-review :)

Copy link
Contributor

@3vilhamster 3vilhamster left a comment

Choose a reason for hiding this comment

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

Looks good :)

@jakobht jakobht merged commit 9e2b796 into cadence-workflow:master May 2, 2025
23 checks passed
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.

2 participants