forked from TrueCloudLab/frostfs-contract
[#284] *: Update version and remove the old migration code
Less chances to forget anything in the next release. Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
38246cd54f
commit
beaef7b10d
3 changed files with 4 additions and 23 deletions
|
@ -94,25 +94,6 @@ func _deploy(data interface{}, isUpdate bool) {
|
|||
|
||||
if isUpdate {
|
||||
common.CheckVersion(args.version)
|
||||
|
||||
count := getSnapshotCount(ctx)
|
||||
prefix := []byte(snapshotKeyPrefix)
|
||||
for i := 0; i < count; i++ {
|
||||
key := append(prefix, byte(i))
|
||||
data := storage.Get(ctx, key)
|
||||
if data != nil {
|
||||
nodes := std.Deserialize(data.([]byte)).([]Node)
|
||||
for i := range nodes {
|
||||
// Old structure contains only the first field,
|
||||
// second is implicitly assumed to be Online.
|
||||
nodes[i] = Node{
|
||||
BLOB: nodes[i].BLOB,
|
||||
State: NodeStateOnline,
|
||||
}
|
||||
}
|
||||
common.SetSerialized(ctx, key, nodes)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue