Skip to content

Commit a1fe736

Browse files
committed
Do not unswap Cidv0s in MFS/pinset tree during reversions.
They are fine as they are.
1 parent fc971af commit a1fe736

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs-repo-11-to-12/migration/migration.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,10 @@ func walkPinsAndMFS(unswapCh chan Swap, dstore ds.Batching) error {
361361
// We have everything. We send unswap requests
362362
// for all these blocks.
363363
err = gcs.ForEach(func(c cid.Cid) error {
364+
// CidV0s are always fine. We do not need to unswap them.
365+
if c.Version() == 0 {
366+
return nil
367+
}
364368
mhash := c.Hash()
365369
mhashKey := dshelp.MultihashToDsKey(mhash)
366370
cidKey := cidToDsKey(c)

0 commit comments

Comments
 (0)