diff --git a/api/api_worker.go b/api/api_worker.go index e65ea5f1d..00c4df8bc 100644 --- a/api/api_worker.go +++ b/api/api_worker.go @@ -27,7 +27,7 @@ type WorkerAPI interface { storage.Sealer - MoveStorage(ctx context.Context, sector abi.SectorID) error + MoveStorage(ctx context.Context, sector abi.SectorID, types stores.SectorFileType) error UnsealPiece(context.Context, abi.SectorID, storiface.UnpaddedByteIndex, abi.UnpaddedPieceSize, abi.SealRandomness, cid.Cid) error ReadPiece(context.Context, io.Writer, abi.SectorID, storiface.UnpaddedByteIndex, abi.UnpaddedPieceSize) (bool, error) diff --git a/api/apistruct/struct.go b/api/apistruct/struct.go index 2422d7cd8..33b02933f 100644 --- a/api/apistruct/struct.go +++ b/api/apistruct/struct.go @@ -317,7 +317,7 @@ type WorkerStruct struct { FinalizeSector func(context.Context, abi.SectorID, []storage.Range) error `perm:"admin"` ReleaseUnsealed func(ctx context.Context, sector abi.SectorID, safeToFree []storage.Range) error `perm:"admin"` Remove func(ctx context.Context, sector abi.SectorID) error `perm:"admin"` - MoveStorage func(ctx context.Context, sector abi.SectorID) error `perm:"admin"` + MoveStorage func(ctx context.Context, sector abi.SectorID, types stores.SectorFileType) error `perm:"admin"` StorageAddLocal func(ctx context.Context, path string) error `perm:"admin"` UnsealPiece func(context.Context, abi.SectorID, storiface.UnpaddedByteIndex, abi.UnpaddedPieceSize, abi.SealRandomness, cid.Cid) error `perm:"admin"` @@ -1220,8 +1220,8 @@ func (w *WorkerStruct) Remove(ctx context.Context, sector abi.SectorID) error { return w.Internal.Remove(ctx, sector) } -func (w *WorkerStruct) MoveStorage(ctx context.Context, sector abi.SectorID) error { - return w.Internal.MoveStorage(ctx, sector) +func (w *WorkerStruct) MoveStorage(ctx context.Context, sector abi.SectorID, types stores.SectorFileType) error { + return w.Internal.MoveStorage(ctx, sector, types) } func (w *WorkerStruct) StorageAddLocal(ctx context.Context, path string) error { diff --git a/build/version.go b/build/version.go index cfa24f18b..a6d86583f 100644 --- a/build/version.go +++ b/build/version.go @@ -53,7 +53,7 @@ func (ve Version) EqMajorMinor(v2 Version) bool { } // APIVersion is a semver version of the rpc api exposed -var APIVersion Version = newVer(0, 13, 0) +var APIVersion Version = newVer(0, 14, 0) //nolint:varcheck,deadcode const ( diff --git a/documentation/en/api-methods.md b/documentation/en/api-methods.md index e07b08b40..fbee92c83 100644 --- a/documentation/en/api-methods.md +++ b/documentation/en/api-methods.md @@ -198,7 +198,7 @@ Response: ```json { "Version": "string value", - "APIVersion": 3328, + "APIVersion": 3584, "BlockDelay": 42 } ``` diff --git a/extern/sector-storage/localworker.go b/extern/sector-storage/localworker.go index f96cc8472..773ef2d3b 100644 --- a/extern/sector-storage/localworker.go +++ b/extern/sector-storage/localworker.go @@ -208,8 +208,8 @@ func (l *LocalWorker) Remove(ctx context.Context, sector abi.SectorID) error { return err } -func (l *LocalWorker) MoveStorage(ctx context.Context, sector abi.SectorID) error { - if err := l.storage.MoveStorage(ctx, sector, l.scfg.SealProofType, stores.FTSealed|stores.FTCache); err != nil { +func (l *LocalWorker) MoveStorage(ctx context.Context, sector abi.SectorID, types stores.SectorFileType) error { + if err := l.storage.MoveStorage(ctx, sector, l.scfg.SealProofType, types); err != nil { return xerrors.Errorf("moving sealed data to storage: %w", err) } diff --git a/extern/sector-storage/manager.go b/extern/sector-storage/manager.go index 2d5741e66..300958e39 100644 --- a/extern/sector-storage/manager.go +++ b/extern/sector-storage/manager.go @@ -31,7 +31,7 @@ type URLs []string type Worker interface { ffiwrapper.StorageSealer - MoveStorage(ctx context.Context, sector abi.SectorID) error + MoveStorage(ctx context.Context, sector abi.SectorID, types stores.SectorFileType) error Fetch(ctx context.Context, s abi.SectorID, ft stores.SectorFileType, ptype stores.PathType, am stores.AcquireMode) error UnsealPiece(context.Context, abi.SectorID, storiface.UnpaddedByteIndex, abi.UnpaddedPieceSize, abi.SealRandomness, cid.Cid) error @@ -441,7 +441,7 @@ func (m *Manager) FinalizeSector(ctx context.Context, sector abi.SectorID, keepU err = m.sched.Schedule(ctx, sector, sealtasks.TTFetch, fetchSel, schedFetch(sector, stores.FTCache|stores.FTSealed|moveUnsealed, stores.PathStorage, stores.AcquireMove), func(ctx context.Context, w Worker) error { - return w.MoveStorage(ctx, sector) + return w.MoveStorage(ctx, sector, stores.FTCache|stores.FTSealed|moveUnsealed) }) if err != nil { return xerrors.Errorf("moving sector to storage: %w", err) diff --git a/extern/sector-storage/sched_test.go b/extern/sector-storage/sched_test.go index 08fdbe38f..4c39370a0 100644 --- a/extern/sector-storage/sched_test.go +++ b/extern/sector-storage/sched_test.go @@ -82,7 +82,7 @@ func (s *schedTestWorker) AddPiece(ctx context.Context, sector abi.SectorID, pie panic("implement me") } -func (s *schedTestWorker) MoveStorage(ctx context.Context, sector abi.SectorID) error { +func (s *schedTestWorker) MoveStorage(ctx context.Context, sector abi.SectorID, types stores.SectorFileType) error { panic("implement me") } diff --git a/extern/sector-storage/testworker_test.go b/extern/sector-storage/testworker_test.go index f9b541f0a..858b76f7c 100644 --- a/extern/sector-storage/testworker_test.go +++ b/extern/sector-storage/testworker_test.go @@ -85,7 +85,7 @@ func (t *testWorker) Remove(ctx context.Context, sector abi.SectorID) error { panic("implement me") } -func (t *testWorker) MoveStorage(ctx context.Context, sector abi.SectorID) error { +func (t *testWorker) MoveStorage(ctx context.Context, sector abi.SectorID, types stores.SectorFileType) error { panic("implement me") }