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

feat: --reset flag on swarm limit command #9310

Merged
merged 5 commits into from
Oct 12, 2022

Conversation

ajnavarro
Copy link
Member

@ajnavarro ajnavarro commented Sep 27, 2022

This flag allows the user to reset limits to default values.

It closes #8918

Signed-off-by: Antonio Navarro Perez [email protected]

@guseggert
Copy link
Contributor

guseggert commented Oct 5, 2022

I'm still trying to ramp back up on this code b/c it is quite complex, but there are some things not working end-to-end, for example:

$ ipfs swarm limit svc:dht
{
  "Conns": 0,
  "ConnsInbound": 0,
  "ConnsOutbound": 0,
  "FD": 0,
  "Memory": 1115947008,
  "Streams": 32768,
  "StreamsInbound": 8192,
  "StreamsOutbound": 32768
}
$ ipfs swarm limit svc:dht --reset
{
  "Conns": 0,
  "ConnsInbound": 0,
  "ConnsOutbound": 0,
  "FD": 0,
  "Memory": 0,
  "Streams": 0,
  "StreamsInbound": 0,
  "StreamsOutbound": 0
}
$ ipfs swarm limit svc:dht
{
  "Conns": 0,
  "ConnsInbound": 0,
  "ConnsOutbound": 0,
  "FD": 0,
  "Memory": 0,
  "Streams": 0,
  "StreamsInbound": 0,
  "StreamsOutbound": 0
}

core/commands/swarm.go Outdated Show resolved Hide resolved
core/node/libp2p/rcmgr.go Outdated Show resolved Hide resolved
core/node/libp2p/rcmgr.go Outdated Show resolved Hide resolved
core/node/libp2p/rcmgr.go Outdated Show resolved Hide resolved
core/node/libp2p/rcmgr.go Outdated Show resolved Hide resolved
@ajnavarro
Copy link
Member Author

I'm still trying to ramp back up on this code b/c it is quite complex, but there are some things not working end-to-end, for example

Yeah, I didn't fully understand the logic with default values here, so I was resetting to zero values as a default (that is how it works with unset values if you set a specific limit, all other values will be zero values).

ajnavarro and others added 5 commits October 11, 2022 09:28
This flag allows to the user to reset limits to default values.

Signed-off-by: Antonio Navarro Perez <[email protected]>
Signed-off-by: Antonio Navarro Perez <[email protected]>
@ajnavarro ajnavarro force-pushed the feature/reset-resource-manager branch from b7c3059 to 03b564e Compare October 11, 2022 07:32
@BigLep BigLep removed the request for review from lidel October 11, 2022 16:33
@guseggert guseggert merged commit bf8274f into master Oct 12, 2022
@ajnavarro ajnavarro deleted the feature/reset-resource-manager branch October 12, 2022 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Implement ipfs swarm limit [scope] --reset
2 participants