Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Fast in-place migration for adding and removing column families #4687

Merged
merged 7 commits into from
Feb 28, 2017

Conversation

rphmeier
Copy link
Contributor

...instead of copying everything over. Now the v10 -> v11 migration is lightning fast, even in debug mode.

@arkpar Touches some of the kvdb code which is a little sensitive. Mind taking a look?

Closes #4681

@rphmeier rphmeier added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Feb 26, 2017
@rphmeier rphmeier requested a review from arkpar February 26, 2017 18:33
fs::rename(&db_path, &backup_path)?;
// completely in-place migration leads to the paths being equal.
// in that case, no need to shuffle directories.
if temp_path != db_path {
Copy link
Contributor

Choose a reason for hiding this comment

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

to avoid nesting?

if temp_path == db_path { return Ok(()); }

util/src/kvdb.rs Outdated
}
}

// open 5, remove all.
Copy link
Contributor

@NikVolf NikVolf Feb 27, 2017

Choose a reason for hiding this comment

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

split to separate tests according to F.I.R.S.T ?

@NikVolf NikVolf added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Feb 27, 2017
@rphmeier rphmeier merged commit 655c7ae into master Feb 28, 2017
@arkpar arkpar deleted the fast-migrate branch March 8, 2017 15:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants