-
Notifications
You must be signed in to change notification settings - Fork 2.2k
skip blocks with out-of-order chunk during compaction #4469
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,12 +111,9 @@ func (i HealthStats) Issue347OutsideChunksErr() error { | |
return nil | ||
} | ||
|
||
// CriticalErr returns error if stats indicates critical block issue, that might solved only by manual repair procedure. | ||
func (i HealthStats) CriticalErr() error { | ||
var errMsg []string | ||
|
||
if i.OutOfOrderSeries > 0 { | ||
errMsg = append(errMsg, fmt.Sprintf( | ||
func (i HealthStats) OutOfOrderChunksErr() error { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am wondering, do you think we can just skip compaction for all the CriticalErr; instead of just OutOfOrderChunksErr? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's okay on the compact side given we cannot generate more blocks than not compacting...I don't think there's much implication on the retrieval side either but would like to hear what @yeya24 thinks : ) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bwplotka do you have some context on the discussion? :) |
||
if i.OutOfOrderChunks > 0 { | ||
return errors.New(fmt.Sprintf( | ||
"%d/%d series have an average of %.3f out-of-order chunks: "+ | ||
"%.3f of these are exact duplicates (in terms of data and time range)", | ||
i.OutOfOrderSeries, | ||
|
@@ -125,6 +122,12 @@ func (i HealthStats) CriticalErr() error { | |
float64(i.DuplicatedChunks)/float64(i.OutOfOrderChunks), | ||
)) | ||
} | ||
return nil | ||
} | ||
|
||
// CriticalErr returns error if stats indicates critical block issue, that might solved only by manual repair procedure. | ||
func (i HealthStats) CriticalErr() error { | ||
var errMsg []string | ||
|
||
n := i.OutsideChunks - (i.CompleteOutsideChunks + i.Issue347OutsideChunks) | ||
if n > 0 { | ||
|
@@ -158,6 +161,10 @@ func (i HealthStats) AnyErr() error { | |
errMsg = append(errMsg, err.Error()) | ||
} | ||
|
||
if err := i.OutOfOrderChunksErr(); err != nil { | ||
errMsg = append(errMsg, err.Error()) | ||
} | ||
|
||
if len(errMsg) > 0 { | ||
return errors.New(strings.Join(errMsg, ", ")) | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.