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

Panic if page provided to freelist.read is incorrect page type. #66

Merged
merged 1 commit into from
Nov 16, 2017

Conversation

jpbetz
Copy link
Contributor

@jpbetz jpbetz commented Nov 15, 2017

Encountered this when debugging an issue found by etcd-io/etcd#8813 CI tests.

This check simply aims to fail fast if ever bolt attempts to load a non-freelist page as a freelist, which has the potential to lead to data corruption.

@codecov-io
Copy link

Codecov Report

Merging #66 into master will decrease coverage by 0.09%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #66     +/-   ##
=========================================
- Coverage   85.56%   85.47%   -0.1%     
=========================================
  Files           9        9             
  Lines        1857     1859      +2     
=========================================
  Hits         1589     1589             
- Misses        159      160      +1     
- Partials      109      110      +1
Impacted Files Coverage Δ
freelist.go 81.7% <0%> (-1.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3c6cbfb...237a4fc. Read the comment docs.

@gyuho gyuho requested a review from xiang90 November 16, 2017 00:23
@gyuho
Copy link
Contributor

gyuho commented Nov 16, 2017

For compatibility with all etcd 3.2.* releases, the NoFreelistSync option introduced in #1 will not be enabled.

So, we never saw this in etcd because we always set NoFreelistSync: true?

@jpbetz
Copy link
Contributor Author

jpbetz commented Nov 16, 2017

Yes, still hunting down root cause of the etcd-io/etcd#8813 CI failure, but it appears to be a bug with freelist writes that only applies when NoFreelistSync: false, which we don't test on master because we have NoFreelistSync: true there.

@xiang90
Copy link
Contributor

xiang90 commented Nov 16, 2017

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants