-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Feat: Implement ipfs swarm limit [scope] --reset #8950
base: master
Are you sure you want to change the base?
Conversation
Thank you for submitting this PR!
Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment.
We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution. |
Hi @guseggert, @lidel |
@schomatis : can you take this PR please? I believe the related issue has the important context. |
@schomatis : if there are followup questions, @guseggert can help. |
Not related on the code at all.
or
Also pls add this as it's own paragraph. Then github will wire "may be fixed messages" and automatically close the issue if this gets merged. 🙂 |
Ack, will review next week. @Ghvstcode Thanks for the patch. We're likely going to need a test for this command in sharness. If you're not familiar with it could you write here an example run of your command and what output you'd expect, please? Without any context on this I'm assuming it'd be something like:
(Basically your command and the expected output in a couple of typical use cases.) |
For more background the other rcmgr tests are in: https://github.com/ipfs/go-ipfs/blob/master/test/sharness/t0139-swarm-rcmgr.sh. |
case true: | ||
result.Dynamic = true | ||
result.MemoryFraction = mem.MemoryFraction | ||
result.MinMemory = mem.MinMemory | ||
result.MaxMemory = mem.MaxMemory | ||
result.Streams = limit.Streams | ||
result.StreamsInbound = limit.StreamsInbound | ||
result.StreamsOutbound = limit.StreamsOutbound | ||
result.Conns = limit.Conns | ||
result.ConnsInbound = limit.ConnsInbound | ||
result.ConnsOutbound = limit.ConnsOutbound | ||
result.FD = limit.FD | ||
case false: | ||
result.Dynamic = false | ||
result.Memory = mem.GetMemory(int64(memory.TotalMemory())) | ||
result.Streams = limit.Streams | ||
result.StreamsInbound = limit.StreamsInbound | ||
result.StreamsOutbound = limit.StreamsOutbound | ||
result.Conns = limit.Conns | ||
result.ConnsInbound = limit.ConnsInbound | ||
result.ConnsOutbound = limit.ConnsOutbound | ||
result.FD = limit.FD |
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.
Why do we need this?
Hey there,
This PR adds support for resetting custom limits by scope to implicit defaults.
Closes #8918!
———
Summary