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(resharding): log time spent in resharder operations #12238

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

Trisfald
Copy link
Contributor

@Trisfald Trisfald commented Oct 16, 2024

Adding log entries telling the time spent on the longer operations happening during flat storage resharding.

Part of flat storage resharding issue (#12174).

@Trisfald Trisfald requested a review from a team as a code owner October 16, 2024 21:19
Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.72%. Comparing base (aa48e52) to head (909bdb3).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12238      +/-   ##
==========================================
- Coverage   71.73%   71.72%   -0.01%     
==========================================
  Files         835      835              
  Lines      166684   166646      -38     
  Branches   166684   166646      -38     
==========================================
- Hits       119573   119534      -39     
- Misses      41884    41889       +5     
+ Partials     5227     5223       -4     
Flag Coverage Δ
backward-compatibility 0.17% <0.00%> (+<0.01%) ⬆️
db-migration 0.17% <0.00%> (+<0.01%) ⬆️
genesis-check 1.25% <0.00%> (+<0.01%) ⬆️
integration-tests 38.88% <81.81%> (-0.02%) ⬇️
linux 71.38% <100.00%> (-0.02%) ⬇️
linux-nightly 71.31% <100.00%> (+<0.01%) ⬆️
macos 54.41% <100.00%> (-0.08%) ⬇️
pytests 1.57% <0.00%> (+<0.01%) ⬆️
sanity-checks 1.37% <0.00%> (+<0.01%) ⬆️
unittests 65.53% <100.00%> (-0.01%) ⬇️
upgradability 0.21% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

// TODO(Trisfald): metrics and logs
let time = timer.elapsed();
batches_done += 1;
debug!(target: "resharding", ?time, ?batches_done, "flat storage resharding split shard batch processed");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why an event rather than another span?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean span for the loop (or the whole function) + event for every finished iteration? Otherwise I don't understand why the span may be needed for this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched to use a span

@@ -310,6 +321,12 @@ impl FlatStorageResharder {

/// Performs post-processing of shard splitting after all key-values have been moved from parent to
/// children. `success` indicates whether or not the previous phase was successful.
#[tracing::instrument(
level = "info",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is info appropriate here given that the instrumentations above are both debug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I've re-thought log levels in this file

@Trisfald Trisfald added this pull request to the merge queue Oct 17, 2024
Merged via the queue into near:master with commit b399ae3 Oct 17, 2024
29 of 30 checks passed
@Trisfald Trisfald deleted the flat-storage-resharding-timers branch October 17, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants