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

Preserve original fd blocking state in TLS I/O operations #1298

Open
wants to merge 1 commit into
base: unstable
Choose a base branch
from

Conversation

xbasel
Copy link
Member

@xbasel xbasel commented Nov 13, 2024

This change prevents unintended side effects on connection state and improves consistency with non-TLS sync operations.

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 44.44444% with 5 lines in your changes missing coverage. Please review.

Project coverage is 70.66%. Comparing base (2df56d8) to head (a2e1b22).

Files with missing lines Patch % Lines
src/anet.c 44.44% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1298      +/-   ##
============================================
- Coverage     70.69%   70.66%   -0.03%     
============================================
  Files           114      114              
  Lines         63161    63169       +8     
============================================
- Hits          44650    44637      -13     
- Misses        18511    18532      +21     
Files with missing lines Coverage Δ
src/tls.c 100.00% <ø> (ø)
src/anet.c 73.23% <44.44%> (-0.87%) ⬇️

... and 10 files with indirect coverage changes

This change prevents unintended side effects on connection state
and improves consistency with non-TLS sync operations.
@xbasel
Copy link
Member Author

xbasel commented Nov 13, 2024

Please note that timeouts are still not restored. Not sure we should worry about timeouts.

Copy link
Member

@ranshid ranshid left a comment

Choose a reason for hiding this comment

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

I agree that the timeout is not the thing we should keep track of, however I wonder why we cannot just flag the connection with indication that it is blocked instead of going through the fcntl all the time?

@xbasel
Copy link
Member Author

xbasel commented Nov 18, 2024

I agree that the timeout is not the thing we should keep track of, however I wonder why we cannot just flag the connection with indication that it is blocked instead of going through the fcntl all the time?

Using an app-level flag adds complexity and risks desync with the kernel. fcntl is lightweight, reliable, and avoids duplication.

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.

2 participants