-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat: Provider.WorkerCount
and stats reprovide
cmd
#10779
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
Conversation
7ec2b65
to
da10f2e
Compare
da10f2e
to
05d0bb3
Compare
401a9e2
to
62d51d6
Compare
Currently two failing tests:
|
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.
Thank you @guillaumemichel, quick pass from UX perspective with some asks inline
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.
nit: renaming field names here is a breaking change to existing command.
It will break compatibility with older RPC clients, libraries, and will also break user's scripts and automations.
Mind adding a note about this to the Changelog?
Since we have two queues, and they behave differently, I wonder if we should have ipfs stat provide
and ipfs stat reprovide
? (e.g. if we make breaking change anyway, any reason to not rename current provide
to reprovide
?)
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.
I marked ipfs stats provide
as deprecated, and renamed it to ipfs stats reprovide
.
ipfs stats provide
shows the same stats as ipfs stats reprovide
but with the old names (only information related to reprovides, because we don't track provides anymore), so it shouldn't break existing scripts.
b9567ae
to
17e0c68
Compare
17e0c68
to
617d5c8
Compare
44f8b21
to
c65608c
Compare
we dont do that for Reprovider.Strategy which is more important, this should reduce user confusion
explicitly document it is not used - without this legacy users will have it in their config and be very confused
db5ffe9
to
06e6618
Compare
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.
configuration lgtm, thank you!
(pushed small cosmetic tweaks to reduce confusion related to Provider.Strategy
vs Reprovider.Strategy
)
Provider.WorkerCount
and stats reprovider
cmd
fmt.Fprintf(wtr, "TotalProvides:\t%s\n", humanNumber(s.TotalReprovides)) | ||
fmt.Fprintf(wtr, "AvgProvideDuration:\t%s\n", humanDuration(s.AvgReprovideDuration)) |
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.
Are the printed names correct? Seems like they should match the variable names, even if that causes a breaking change.
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.
Well, we would be making a breaking change – see #10779 (comment)
Safer to keep stats provide
as-is now and mark it as deprecated + add new stats reprovide
which has new labels.
We will remove / change stats provide
in future release.
|
||
### `Provider.Strategy` | ||
|
||
Legacy, not used at the moment, see [`Reprovider.Strategy`](#reproviderstrategy) instead. |
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.
Legacy, not used at the moment, see [`Reprovider.Strategy`](#reproviderstrategy) instead. | |
Legacy, no longer used, see [`Reprovider.Strategy`](#reproviderstrategy) instead. |
Otherwise, it sounds like we are trying to communicate a planned future use.
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.
We might? Now that we have separate queues, we may have strategies related to provide
that are different than reprovide
Left as-is for now.
Provider.WorkerCount
and stats reprovider
cmdProvider.WorkerCount
and stats reprovide
cmd
Provider.WorkerCount
and stats reprovide
cmdProvider.WorkerCount
and stats reprovide
cmd
This PR finalizes separation of
provide
andreprovide
queues and exposes new configuration for adjusting performance of first-timeprovide
.