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

Add setting connected_event flag in libevreactor #292

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

sylwiaszunejko
Copy link
Collaborator

Before, the connected_event flag was set in every implementation of Connection but this utilizing libev. That was causing the driver to sometimes hang for >3 minutes when shutting down.

This PR adds setting the connected_event flag in close() in LibevConnection.

Fixes: #172

Copy link

@avelanarius avelanarius left a comment

Choose a reason for hiding this comment

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

LGTM, you should add the description of PR to the commit message and you should add that other reactors have the same self.error_all_requests(ConnectionShutdown(...)) logic, but they have self.connected_event.set() after that, so it was probably an oversight (copy-paste mistake?) that it was missing from this reactor.

Before, the connected_event flag was set in every implementation
of Connection but this utilizing libev. Other reactors have the
same `self.error_all_requests(ConnectionShutdown(...))` logic, but
they have `self.connected_event.set()` after that, so it was probably
an oversight (copy-paste mistake?) that it was missing from this
reactor. That was causing the driver to sometimes hang for >3 minutes
when shutting down.

This commit adds setting the `connected_event` flag in `close()` in
`LibevConnection`.
@sylwiaszunejko
Copy link
Collaborator Author

I updated the commit message

@Lorak-mmk Lorak-mmk merged commit a1e35bd into scylladb:master Jan 18, 2024
18 of 20 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.

Driver hanging for >3 minutes when shutting down
3 participants