Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

mvcc: restore into tree index with one key index #8127

Merged
merged 2 commits into from
Jun 19, 2017

Conversation

heyitsanthony
Copy link
Contributor

Clobbering the mvcc kvindex with new keyIndexes for each restore
chunk would cause index corruption by dropping historical information.

@xiang90
Copy link
Contributor

xiang90 commented Jun 18, 2017

will this fix #8048?

@heyitsanthony
Copy link
Contributor Author

@xiang90 yes, appears to be fixed; could repro on master, can't repro with the patch

@heyitsanthony heyitsanthony force-pushed the fix-restore branch 3 times, most recently from d939914 to 39fad19 Compare June 19, 2017 06:38
@xiang90
Copy link
Contributor

xiang90 commented Jun 19, 2017

/cc @fanminshi

mvcc/kvstore.go Outdated
kiCache := make(map[string]*keyIndex, restoreChunkKeys)
for rkv := range rkvc {
ki, ok := kiCache[rkv.kstr]
// purge cache if too many keys and missing
Copy link
Contributor

Choose a reason for hiding this comment

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

s/many keys and/many keys are/?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

missing as in rkv.kstr is missing, but can clarify

Anthony Romano added 2 commits June 19, 2017 12:04
Clobbering the mvcc kvindex with new keyIndexes for each restore
chunk would cause index corruption by dropping historical information.
Copy link
Contributor

@gyuho gyuho left a comment

Choose a reason for hiding this comment

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

lgtm. Can confirm that this fixes the functional-tester issue. Thanks!

@heyitsanthony heyitsanthony merged commit 66f553a into etcd-io:master Jun 19, 2017
@heyitsanthony heyitsanthony deleted the fix-restore branch June 19, 2017 19:58
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants