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

[dbnode] Add ability to force repair regardless namespace has option set and add compare only repair type #3550

Merged
merged 8 commits into from
Jun 10, 2021

Conversation

robskillington
Copy link
Collaborator

@robskillington robskillington commented Jun 9, 2021

What this PR does / why we need it:

Adds ability to force repair regardless of if a namespace has repair option set or not. Also adds the ability to simply run comparison and emit metrics instead of executing the repair of the data, useful for assessing health of the cluster without automatic background repairs running.

Also adds an integration test that verifies the flags are respected between the different components in the storage package.

Special notes for your reviewer:

Does this PR introduce a user-facing and/or backwards incompatible change?:

NONE

Does this PR require updating code package or user-facing documentation?:

NONE

@robskillington robskillington enabled auto-merge (squash) June 9, 2021 18:58
@robskillington robskillington changed the title [dbnode] Add ability to force repair regardless namespace has option set and allow compare only repair type [dbnode] Add ability to force repair regardless namespace has option set and add compare only repair type Jun 9, 2021
Copy link
Collaborator

@arnikola arnikola left a comment

Choose a reason for hiding this comment

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

LGTM

src/dbnode/storage/types.go Show resolved Hide resolved
// Type is the type of repair to run.
Type repair.Type `yaml:"type"`

// Force the repair to run regardless of whether namespaces have repair enabled or not.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: change to ForceEnabled for context?

var successCounters []tally.CounterSnapshot
for _, setup := range setups {
scope := setup.Scope()
for _, v := range scope.Snapshot().Counters() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: can also use tallytest.AssertCounterValue but it can be a little finicky

@robskillington robskillington merged commit d95a5df into master Jun 10, 2021
@robskillington robskillington deleted the r/add-repair-force-and-compare-only-flags branch June 10, 2021 03:31
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.

2 participants