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

Support Index generation on the fly during shard acquisition #83

Open
aarshkshah1992 opened this issue Jul 22, 2021 · 2 comments
Open
Assignees
Milestone

Comments

@aarshkshah1992
Copy link
Contributor

aarshkshah1992 commented Jul 22, 2021

Lotus Miners will delete the dagstore repo if they have to rollback for some reason. This means that retrieval deals will fail for the (storage deal with upgraded miner -> miner rolls-back and deletes the dagstore repo -> miner upgrades and we do a retrieval) scenario because AcquireShard will fail to find an Index. I think we should allow index generation on the fly during shard acquisition for scenarios such as these where the underlying Mount returns valid data but the Index has gone missing. We can have an option to disable this if needed.

I think a lot of clients will face scenarios such as these.

@aarshkshah1992 aarshkshah1992 self-assigned this Jul 22, 2021
@raulk
Copy link
Member

raulk commented Jul 22, 2021

Isn't lotus executing the migration again on the second upgrade? If not, that should be fixed.

@aarshkshah1992
Copy link
Contributor Author

aarshkshah1992 commented Jul 22, 2021

@raulk

  • But the shard has already been registered. Even if we execute the migration again, we still wont re-index it (assuming the datastore we pass to DAGStore will already have the shard registered) unless we ship a cli/instructions on how to clear up the datastore. Actually, I just thought about this and think that we should clear up the existing DAGStore data in Badger before starting a migration as the migration will build up the enitre state again.

  • However, it's not inconceivable that miners might delete Index files (even if we keep aside the discussion of upgrade/rollback) to reclaim space but still expect retrievals to work. Future non-Lotus dagstore clients too will need this I think.

@raulk raulk added this to the future milestone Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants