etcdutl: Implement migrate --force command

Co-authored-by: nic-chen <33000667+nic-chen@users.noreply.github.com>
Co-authored-by: Heisenberg <yuzhiquanlong@gmail.com>
This commit is contained in:
Marek Siarkowicz
2021-07-16 15:02:31 +02:00
parent c8c7fc49b8
commit b4b50f7852
8 changed files with 315 additions and 2 deletions

View File

@ -59,3 +59,8 @@ func UnsafeSetStorageVersion(tx backend.BatchTx, v *semver.Version) {
sv := semver.Version{Major: v.Major, Minor: v.Minor}
tx.UnsafePut(Meta, MetaStorageVersionName, []byte(sv.String()))
}
// UnsafeClearStorageVersion removes etcd storage version in backend.
func UnsafeClearStorageVersion(tx backend.BatchTx) {
tx.UnsafeDelete(Meta, MetaStorageVersionName)
}