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

Closing session with possible in-flight queries #645

Closed
kathirsvn opened this issue Nov 15, 2023 · 1 comment · Fixed by #730
Closed

Closing session with possible in-flight queries #645

kathirsvn opened this issue Nov 15, 2023 · 1 comment · Fixed by #730
Assignees

Comments

@kathirsvn
Copy link
Contributor

In the native cql driver based implementation, the driver cqlsession object is getting closed on getting evicted from the cache. But there is no check if there are any queries in-flight before closing the session. In other words, is there a graceful close for session?

@kathirsvn kathirsvn mentioned this issue Nov 15, 2023
4 tasks
@tatu-at-datastax
Copy link
Contributor

One possibility would be to make closing on expiration delayed by certain amount (15 seconds?). So when "expire-from-cache" is called, actual closing is done from different thread after some delay.
Since connection is no longer accessible via cache, it should drain.

Alternatively we could of course add simple ref counting (keep track of in-flight request count over connection), but if we do that we probably still want some kind of force close after delay in case of stuck requests.

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 a pull request may close this issue.

2 participants