Skip to content

Buffer data if needed when using socket send nowait #9879

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

Open
wants to merge 3 commits into
base: maint
Choose a base branch
from

Conversation

dgud
Copy link
Contributor

@dgud dgud commented May 26, 2025

Make socket usage behave like gen_tcp i.e. if socket would block buffer data up to high_watermark.

@dgud dgud requested review from IngelaAndin and RaimoNiskanen May 26, 2025 14:33
@dgud dgud self-assigned this May 26, 2025
@dgud dgud added the team:PS Assigned to OTP team PS label May 26, 2025
@dgud dgud changed the base branch from master to maint May 26, 2025 14:34
Copy link
Contributor

github-actions bot commented May 26, 2025

CT Test Results

    2 files     66 suites   26m 22s ⏱️
  816 tests   772 ✅  43 💤 1 ❌
4 186 runs  3 385 ✅ 800 💤 1 ❌

For more details on these failures, see this check.

Results for commit fb132c1.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@dgud dgud added the testing currently being tested, tag is used by OTP internal CI label May 26, 2025
@dgud dgud mentioned this pull request May 27, 2025
@dgud dgud removed the testing currently being tested, tag is used by OTP internal CI label Jun 9, 2025
@dgud dgud force-pushed the dgud/ssl/socket-async-send/OTP-19651 branch 5 times, most recently from 511bbb5 to e20ed00 Compare June 11, 2025 12:44
@dgud dgud added the testing currently being tested, tag is used by OTP internal CI label Jun 11, 2025
@dgud dgud force-pushed the dgud/ssl/socket-async-send/OTP-19651 branch from e20ed00 to 631ba35 Compare June 12, 2025 06:51
@dgud dgud requested review from IngelaAndin, RaimoNiskanen and u3s and removed request for RaimoNiskanen and IngelaAndin June 12, 2025 10:32
Copy link
Contributor

@u3s u3s left a comment

Choose a reason for hiding this comment

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

don't dare to approve ;-)
but browsed it and have no more comments at this stage.

@dgud dgud force-pushed the dgud/ssl/socket-async-send/OTP-19651 branch from 631ba35 to c62a08b Compare June 18, 2025 10:25
@dgud dgud requested a review from IngelaAndin June 18, 2025 10:51
gen_tcp (or rather inets) have a builtin buffer when socket is
blocked, controlled by high[low]_watermark.

Implement buffering and async send for sockets in tls_sender, to
improve performance when using sockets.
dgud added 2 commits June 24, 2025 11:35
Did not enter passive mode when {active, N} triggered,
i.e. activate was false.

Also improve error handling

Workaround cancel request on downgrade
Thus we can make send async if hanging on outgoing buffer.
@dgud dgud force-pushed the dgud/ssl/socket-async-send/OTP-19651 branch from c62a08b to fb132c1 Compare June 24, 2025 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants