-
Notifications
You must be signed in to change notification settings - Fork 476
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
algod: split SetFdSoftLimit calls for relay and non-relay nodes #5070
algod: split SetFdSoftLimit calls for relay and non-relay nodes #5070
Conversation
* Replace shared "tempdir" by t.TempDir * Make them parallel * Make test naming consistent
Codecov Report
@@ Coverage Diff @@
## master #5070 +/- ##
==========================================
- Coverage 53.58% 53.56% -0.02%
==========================================
Files 430 430
Lines 54088 54131 +43
==========================================
+ Hits 28984 28997 +13
- Misses 22860 22889 +29
- Partials 2244 2245 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
3e44bdd
to
8d2cf28
Compare
8d2cf28
to
7215a3e
Compare
the adjustment logic looks good only remains to be seen that the windows build still operates as expected |
} | ||
err = util.SetFdSoftLimit(fdRequired) | ||
if err != nil { | ||
return fmt.Errorf("Initialize() err: %w", err) | ||
} | ||
if cfg.IsGossipServer() { | ||
var ot basics.OverflowTracker | ||
fdRequired := ot.Add(fdRequired, uint64(cfg.IncomingConnectionsLimit)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shadows fdRequired declared above (but is OK since the original is not used later)
Summary
algod sets RLIMIT_NOFILE to max possible value on startup. This might result the node failure on startup especially if it is a non-relaying node and does not need to listen for thousands of incoming connections.
Additionally enhanced config test since I opened the file:
Test Plan
New test for
IsGossipServer
config helper. Existing tests for everything else.