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

net::Defaults: Revert and re-apply revised code #10366

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

sgothel
Copy link

@sgothel sgothel commented Oct 29, 2024

Summary

net::Defaults was a singleton, becoming a global, keeping untouched constexpr in SocketPoll.

  • Reverts commit 4499e42
  • SocketPoll::DefaultPollTimeoutMicroS is maintained original
  • net::Defaults is a global instance w/ default values
    • inactivityTimeout 3600s
      • instead of using DefaultPollTimeoutMicroS for {idle->inactivity) checkRemoval
    • wsPingAvgTimeout 12s
    • wsPingInterval 18s
    • maxTCPConnections 200000 (arbitrary value)
      • for limiting connections in SocketPoll::poll,
        instead of using the session count

Checklist

  • I have run make prettier-write and formatted the code.
  • All commits have Change-Id
  • I have run tests with make check
  • I have issued make run and manually verified that everything looks okay
  • Documentation (manuals or wiki) has been updated or is not required

@sgothel sgothel added the 24.04 label Oct 29, 2024
@sgothel sgothel self-assigned this Oct 29, 2024
@sgothel sgothel force-pushed the private/sgothel/socketcode_netdefaults branch from 542ccd0 to 9372993 Compare October 29, 2024 15:47
@sgothel sgothel changed the title net::Defaults: Revert and re-apply revised code (singleton -> global, keeping untouched constexpr) net::Defaults: Revert and re-apply revised code Oct 29, 2024
@sgothel sgothel requested review from mmeeks and Ashod October 29, 2024 16:26
@sgothel sgothel force-pushed the private/sgothel/socketcode_netdefaults branch from 9372993 to abb824d Compare October 29, 2024 17:28
@sgothel sgothel mentioned this pull request Oct 30, 2024
5 tasks
net/Socket.cpp Outdated Show resolved Hide resolved
@sgothel sgothel force-pushed the private/sgothel/socketcode_netdefaults branch from abb824d to 03efded Compare October 30, 2024 11:07
@sgothel
Copy link
Author

sgothel commented Oct 30, 2024

revised Socket.cpp include change (force push)

Copy link
Contributor

@mmeeks mmeeks left a comment

Choose a reason for hiding this comment

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

Thanks.

@mmeeks mmeeks enabled auto-merge (rebase) October 30, 2024 11:20
@sgothel
Copy link
Author

sgothel commented Oct 30, 2024

Cypress desktop failures:

  • writer/invalidations_spec.js
  • writer/searchbar_spec.js

@sgothel sgothel force-pushed the private/sgothel/socketcode_netdefaults branch from 03efded to 022ef5b Compare October 30, 2024 14:10
Sven Göthel added 2 commits November 1, 2024 09:02
…tions (timeout)"

This reverts commit 4499e42.

Due to the removal of net::Defaults, the following global constexpr
where introduced to keep functionality
- SocketPoll:DefaultInactivityimeoutMicroS (3600s)
  - replaces of using DefaultPollTimeoutMicroS for {idle->inactivity) checkRemoval
- SocketPoll:DefaultMaxTCPConnections (200000)
  - for limiting TCP connections in SocketPoll::poll,
    instead of using the session count
  - will be revised using system values in subsequent commit

Signed-off-by: Sven Göthel <[email protected]>
Change-Id: I5172b4067598c02678dd0cd2f56c0574013623d1
Using runtime mutable defaults for network properties allows us to
test the connection limitation code.

Costs are removal of constexpr properties, using a global instance,
hence rendering the code less optimized and more pessimistic.

Signed-off-by: Sven Göthel <[email protected]>
Change-Id: I5172b4067598c02678dd0cd2f56c0574013623d1
@caolanm caolanm force-pushed the private/sgothel/socketcode_netdefaults branch from 022ef5b to 0b72b96 Compare November 1, 2024 09:03
@mmeeks mmeeks merged commit c7dddd7 into master Nov 1, 2024
13 checks passed
@mmeeks mmeeks deleted the private/sgothel/socketcode_netdefaults branch November 1, 2024 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Handle limited open Connections due to keepalive connections (cool#9621)
4 participants