fix drop sector
This commit is contained in:
parent
61eb91ff37
commit
3f66e731fa
4
extern/sector-storage/stores/index.go
vendored
4
extern/sector-storage/stores/index.go
vendored
@ -232,7 +232,7 @@ func (i *Index) StorageDropSector(ctx context.Context, storageID ID, s abi.Secto
|
|||||||
d := Decl{s, fileType}
|
d := Decl{s, fileType}
|
||||||
|
|
||||||
if len(i.sectors[d]) == 0 {
|
if len(i.sectors[d]) == 0 {
|
||||||
return nil
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
rewritten := make([]*declMeta, 0, len(i.sectors[d])-1)
|
rewritten := make([]*declMeta, 0, len(i.sectors[d])-1)
|
||||||
@ -245,7 +245,7 @@ func (i *Index) StorageDropSector(ctx context.Context, storageID ID, s abi.Secto
|
|||||||
}
|
}
|
||||||
if len(rewritten) == 0 {
|
if len(rewritten) == 0 {
|
||||||
delete(i.sectors, d)
|
delete(i.sectors, d)
|
||||||
return nil
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
i.sectors[d] = rewritten
|
i.sectors[d] = rewritten
|
||||||
|
Loading…
Reference in New Issue
Block a user