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

fix: epoll socket async chaining and refactor #374

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

kostasrim
Copy link
Contributor

Fixes the problem described in dragonflydb/dragonfly#4498 and here dragonflydb/dragonfly#4498 (comment)

  • fix async chaining
  • small refactor

@kostasrim
Copy link
Contributor Author

kostasrim commented Jan 23, 2025

@romange Fixes the test case as well in DF. I could add a test here but that's something I will be doing anyway when I push my AsyncWrite/AsyncRead on the tls socket.

delete async_request;
async_request = nullptr;
if (is_send)
async_write_pending_ = 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cause lambdas can't capture and use bitfields 😮‍💨

@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 45.94595% with 20 lines in your changes missing coverage. Please review.

Project coverage is 77.83%. Comparing base (d30de86) to head (16f71ae).
Report is 147 commits behind head on master.

Files with missing lines Patch % Lines
util/fibers/epoll_socket.cc 45.94% 20 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #374      +/-   ##
==========================================
+ Coverage   77.60%   77.83%   +0.23%     
==========================================
  Files         103      109       +6     
  Lines        7824     9016    +1192     
==========================================
+ Hits         6072     7018     +946     
- Misses       1752     1998     +246     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

delete async_read_req_;
async_read_req_ = nullptr;
async_read_pending_ = 0;
auto body = [&ec, this](bool is_send) {
Copy link
Owner

Choose a reason for hiding this comment

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

since it captures this, please make it a member function that returns error_code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So much better now, I really don't know what I was thinking with this large lambda

@kostasrim
Copy link
Contributor Author

@romange there seem to be a problem with docker on the CI. I also can't rerun the workflow 😢

@romange romange merged commit b18d739 into romange:master Feb 4, 2025
8 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.

3 participants