-
Notifications
You must be signed in to change notification settings - Fork 34
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
repair: ensure max single repair job per host #3518
repair: ensure max single repair job per host #3518
Conversation
@@ -74,7 +74,7 @@ func (c *rowLevelRepairController) shouldBlock(hosts []string, intensity int) bo | |||
|
|||
// DENY if any host has max nr of jobs already running | |||
for _, h := range hosts { | |||
if c.jobs[h] >= c.limits[h].Default { | |||
if c.jobs[h] >= 1 { |
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: the comment in line 75 is now inaccurate.
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.
thanks, updated the comment + removed another checks that are not relevant anymore
b91d28f
to
6eb2729
Compare
@@ -199,44 +155,3 @@ func TestRowLevelRepairController(t *testing.T) { | |||
} | |||
}) | |||
} | |||
|
|||
func TestRowLevelRepairControllerIssue2446(t *testing.T) { |
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.
Why this test was removed?
t.Fatal("TryBlock() failed to block") | ||
} | ||
if a.Ranges != intensity { |
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.
Should be ">" - exactly as the error message below states.
Repair task is allowed to pick less than "intensity" ranges, e.g. in the last hunk.
There is already a PR that fixes this and other issues which was submitted some time ago: #3506 This PR pretty much copies what this patch (8020beb) from the PR above does in terms of SM fix. Don't you think that it makes more sense to pick the code part from the PR above and leave only the test part from this PR? |
Closing as #3521 is ready |
Fixes #3425
"Only the Best is Good Enough." - LEGO company motto
Please make sure that: