-
Notifications
You must be signed in to change notification settings - Fork 1.6k
av-store: Move prune on a separate thread #7263
av-store: Move prune on a separate thread #7263
Conversation
7ff883b
to
f34c93f
Compare
f34c93f
to
261829a
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.
Nice! Just one nit.
ctx.spawn_blocking( | ||
"av-store-prunning", | ||
Box::pin(async move { | ||
let _timer = metrics.time_pruning(); |
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: I'd also add a debug! log here to know when pruning starts and ends. It would be nice to have when debugging.
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.
yep will do.
Done
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.
Looks good, but I would like to see a Versi burn-in to make sure it doesn't break anything. Although I don't see why it would.
Let’s burn it in and observe the pruning log and column usage. I also agree that this cannot break anything. |
Yeah, makes sense, I'll let you know once I have the results. |
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.
Nice!
(pruning_result_tx, pruning_result_rx): ( | ||
&mut MpscSender<Result<(), Error>>, | ||
&mut MpscReceiver<Result<(), Error>>, | ||
), |
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: It would be simpler for this not to be a tuple, and it would save two lines. 😛
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.
you mean just to have two separate params pruning_result_tx and pruning_result_rx ?
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.
Yep. Just a style nit, feel free to ignore if you want.
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 will keep it as it is than :) , since I think it makes sense to try to have closely related params in the same data structure.
b9b5257
to
756d060
Compare
There are situations where pruning of the data could take more than a few seconds and that might make the whole subsystem unreponsive. To avoid this just move the prune process on a separate thread. See: paritytech#7237, for more details. Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
756d060
to
0dde5a9
Compare
Nice! Thanks @alexggh |
bot merge |
There are situations where pruning of the data could take more than a few seconds and that might make the whole subsystem unreponsive. To avoid this just move the prune process on a separate thread.
See: #7237, for more details.