Merge pull request #5242 from luqz/patch-1

update  weight canSeal and canStore when attach
This commit is contained in:
Łukasz Magiera 2021-01-05 18:35:18 +01:00 committed by GitHub
commit 61b7b86af5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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.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 return nil
} }
i.stores[si.ID] = &storageEntry{ i.stores[si.ID] = &storageEntry{