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

Use a longer driver timeout for drain #454

Merged
merged 2 commits into from
Mar 20, 2024
Merged

Use a longer driver timeout for drain #454

merged 2 commits into from
Mar 20, 2024

Conversation

emerkle826
Copy link
Contributor

Fixes #453

@emerkle826 emerkle826 self-assigned this Mar 11, 2024
datastax-java-driver {
profiles {
slow {
basic.request.timeout = 180 seconds
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to have this set as hardcoded value? At the moment, the way we call /drain might benefit from even no timeout at all, since the pod has a strict timeline until it gets killed in any case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd have to see if it can be set with a variable or something at runtime. The idea is to make this large enough so that none of the driver "calls" times out before getting a response. I don''t think there is a way to set no timeout for driver requests, assuming you mean wait forever. If Kubernetes things end up calling this and they have their own timeout, then as long is this is at least as long as K8s will wait, we should be fine. I'm still not sure the full context of when /drain is called and waiting longer than 3 minutes is expected.

We can raise this timeout to 5 or 10 minutes if you think that would be better. It won't hurt any drain calls that finish in less time. Also, the drain call is the only one using this new "slow" query thing for now. Although #292 might also benefit from using the slow query for taking a snapshot if that function is also taking a long time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, it seems that we can configure the timeout to 0, which would effectively make it wait forever. Do we want to do this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Users are able to configure the /drain timeout using gracePeriod for pods.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change is only going to affect the internal driver query for the drain operation. Outside of a kubernetes environment, with this set to 0, a call to /drain won't get a driver query request timeout. Something else may happen that causes the operation to fail, but otherwise, the driver will wait forever for the agent to complete and return.

@emerkle826 emerkle826 merged commit 9bd600c into master Mar 20, 2024
96 of 97 checks passed
@emerkle826 emerkle826 deleted the add-slow-queries branch March 20, 2024 14:16
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.

Use a longer driver timeout for drain
2 participants