Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Successfully restored and moved to storage, notifying miner to declare the sector. #12

Open
FroghubMan opened this issue Nov 23, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@FroghubMan
Copy link
Member

FroghubMan commented Nov 23, 2021

If the sector is restored successfully, the miner will be notified to declare the sector as soon as possible, then the failure time of this sector can be used.
Need to use MINER_API_INFO to quickly declare the new location of the sector by calling the interface StorageDeclareSector.

@FroghubMan
Copy link
Member Author

The APIs involved include:

StorageDeclareSector(ctx context.Context, storageID ID, s abi.SectorID, ft storiface.SectorFileType, primary bool) error
StorageDropSector(ctx context.Context, storageID ID, s abi.SectorID, ft storiface.SectorFileType) error
StorageFindSector(ctx context.Context, sector abi.SectorID, ft storiface.SectorFileType, ssize abi.SectorSize, allowFetch bool) ([]SectorStorageInfo, error)

Approximate workflow:
First check whether it already exists through StorageFindSector, if it is, discard it(StorageDropSector), and use StorageDeclareSector to declare to a new location.

@FroghubMan FroghubMan added the enhancement New feature or request label Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant