Repository navigation
Conversation
The move selector always asked the index for the best destination path to allocate in, and returned an error when no path had enough free space. A move of files that are already in a long-term storage path is a no-op, but on a full path the selector failed for every worker and the fetch task stayed in the scheduler queue. FinalizeReplicaUpdate hits this because it moves the sealed and cache files, which are usually already in long-term storage. Accept and prefer a worker that already has all requested files in paths of the destination type, before looking for free space. Fixes filecoin-project#10697
Kubuxu
approved these changes
Oct 21, 2026
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
Fixes #10697
Proposed Changes
moveSelector.Okfirst checks if the worker already has every requested file type in one of its paths of the destination type (CanStorefor long-term storage), allowed by that path's type filters. If it does, the move is a no-op, and the worker is accepted and preferred without callingStorageBestAlloc.TestMoveSelectorFullStorageinsched_test.go. It covers a full long-term storage path that already has the sealed and cache files, and a move that also includes an unsealed file from the sealing path, which still fails withno good path found.Additional Info
The selector called
StorageBestAllocfor every move and returned its error. When the storage paths are full that isfinding best dest storage: no good path foundfor every worker, so the scheduler logstrySched(1) req.Sel.Ok erroron each pass and the fetch task never runs.FinalizeReplicaUpdatehits this for snap deals: it runsmove(FTCache)andmove(FTSealed), and those files are normally already in long-term storage. Once the update files are moved there, the path may not have a full sector of free space left, and the sector stays inFinalizeReplicaUpdate.The move itself is already a no-op on master. Since e86d81b,
Local.AcquireSectoralso looks for existing files when it's asked to allocate, and uses them if the path fits the request, soLocal.MoveStoragefinds the destination without needing free space. I checked this with a scratch test on a full path:MoveStoragereturns nil, whileStorageBestAllocreturnsno good path found. After the move,LocalWorker.MoveStoragestill removes copies left in sealing paths.If any requested file still has to be moved, the selector works as before and needs free space for it.
This changes a different part of
Okthan my PR for #9946 (DisallowRemoteFinalize). The two merge without conflicts inselector_move.go, and both tests pass on the merged code.Tests:
go test ./storage/sealer/passes.selector_move.gochange reverted,TestMoveSelectorFullStoragefails withfinding best dest storage: no good path found.gofmt,go vetand golangci-lint v1.64.8 report no issues for./storage/sealer/....Checklist
Before you mark the PR ready for review, please make sure that: