-
Notifications
You must be signed in to change notification settings - Fork 454
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
[dbnode] Add config option to set repair strategy (default/full_sweep) and concurrency #3573
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3573 +/- ##
======================================
Coverage 55.8% 55.8%
======================================
Files 550 550
Lines 62174 62174
======================================
Hits 34699 34699
Misses 24379 24379
Partials 3096 3096
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
@@ -681,6 +695,13 @@ func (r *dbRepairer) Repair() error { | |||
leastRecentlyRepairedBlockStartLastRepairTime xtime.UnixNano | |||
) | |||
repairRange.IterateBackward(blockSize, func(blockStart xtime.UnixNano) bool { | |||
// Update metrics around progress of repair. | |||
blockStartUnixSeconds := blockStart.ToTime().Unix() |
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: blockStart.Seconds()
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.
LGTM
What this PR does / why we need it:
Adds the ability to set repair strategy to full_sweep to sweep from beginning of time to end without restarting when encountering blocks that need repair.
This mode may be more ideal in clusters that have never had repair enabled to ensure that historical data gets repaired at least once on a full sweep before switching back to the default strategy.
It also adds the ability to set the repair concurrency from config.
Special notes for your reviewer:
Does this PR introduce a user-facing and/or backwards incompatible change?:
Does this PR require updating code package or user-facing documentation?: