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

Wal/recover corruption #3117

Merged
merged 7 commits into from
Jan 5, 2021
Merged

Conversation

owen-d
Copy link
Member

@owen-d owen-d commented Jan 4, 2021

This PR introduces a change which notes WAL recovery failures, but allows the process to continue after logging/incrementing metrics. It also simplifies some of the recovery code.

Notably this enables the ingester to optimistically recover what data it can, including allowing later data to recover after i.e. a segment failure. The mentioned metrics can be used with alerts, especially in conjunction with quorum(replication_factor) to warn of data loss.

@codecov-io
Copy link

codecov-io commented Jan 4, 2021

Codecov Report

Merging #3117 (e75859d) into master (03aaa34) will increase coverage by 0.04%.
The diff coverage is 50.98%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3117      +/-   ##
==========================================
+ Coverage   62.83%   62.87%   +0.04%     
==========================================
  Files         186      186              
  Lines       15949    15961      +12     
==========================================
+ Hits        10021    10036      +15     
+ Misses       5000     4998       -2     
+ Partials      928      927       -1     
Impacted Files Coverage Δ
pkg/ingester/recovery.go 65.73% <50.00%> (+3.09%) ⬆️
pkg/ingester/ingester.go 47.96% <52.00%> (+0.76%) ⬆️
pkg/querier/queryrange/downstreamer.go 97.64% <0.00%> (+2.35%) ⬆️

pkg/ingester/ingester.go Outdated Show resolved Hide resolved
pkg/ingester/ingester.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@slim-bean slim-bean left a comment

Choose a reason for hiding this comment

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

LGTM

@owen-d owen-d merged commit ad803af into grafana:master Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants