update weight canSeal and canStore when attach

update  weight canSeal and canStore when attach storage
This commit is contained in:
quanzhan lu 2020-12-22 17:46:58 +08:00
parent e9989d0e46
commit d806fafee8

View File

@ -155,6 +155,10 @@ func (i *Index) StorageAttach(ctx context.Context, si StorageInfo, st fsutil.FsS
i.stores[si.ID].info.URLs = append(i.stores[si.ID].info.URLs, u)
}
i.stores[si.ID].info.Weight = si.Weight
i.stores[si.ID].info.CanSeal = si.CanSeal
i.stores[si.ID].info.CanStore = si.CanStore
return nil
}
i.stores[si.ID] = &storageEntry{