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 cluster configuration with reconnection policy and improve code #301

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

itsfuad
Copy link
Contributor

@itsfuad itsfuad commented Jan 29, 2025

This pull request includes changes to improve the resilience and robustness of the gocqlx library by adding reconnection policies and handling nil contexts. The most important changes include the addition of a constant reconnection policy in the CreateCluster function and the handling of nil contexts in the WithContext method.

Improvements to resilience and robustness:

  • gocqlxtest/gocqlxtest.go: Added a constant reconnection policy to handle reconnections with a maximum of 10 retries and a 3-second interval between retries in the CreateCluster function.
  • queryx_wrap.go: Modified the WithContext method in the Queryx struct to handle nil contexts by defaulting to context.Background().

@sylwiaszunejko
Copy link
Collaborator

Could you please squash your commits so that the commit history doesn't include 'fixes' commits? This will help keep the history cleaner and more concise. Thanks!

@itsfuad
Copy link
Contributor Author

itsfuad commented Jan 29, 2025

Yeah sure

@itsfuad
Copy link
Contributor Author

itsfuad commented Jan 29, 2025

Is that okay now?

@sylwiaszunejko
Copy link
Collaborator

I don't think the information about removing commented-out things and fixing formatting is necessary

@itsfuad
Copy link
Contributor Author

itsfuad commented Jan 29, 2025

Aw.. sorry for that. Can you please check now?

@dkropachev
Copy link
Collaborator

@itsfuad , thanks a lot for you contribution.

@sylwiaszunejko sylwiaszunejko merged commit fd84cf3 into scylladb:master Jan 29, 2025
1 check 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.

3 participants