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

Allow retrievals while sealing #3778

Merged
merged 1 commit into from
Sep 15, 2020
Merged

Conversation

hannahhoward
Copy link
Contributor

Goals

When there is an unsealed copy available, due to fast retrieval, we should be able to fetch it even while the sector is sealing

Implementation

Currently, retrieval during sealing is blocked because the ReadPiece command grabs a storage lock that needs:
Read on Sealed copy and Cache
Write on Unsealed

All of these are needed if an Unseal is neccesary.

However, only Read on Unsealed is needed to first attempt to read the unsealed copy, which will not conflict with the lock for sealing.

The approach here is as follows:

  • Use an initial less restrictive storage lock when trying to read unsealed data
  • Release and acquire a more if needed restrictive lock needed for unsealing

Use initial less restrictive storage lock when trying to read unsealed data before acquiring more
restrictive lock needed for unsealing
@hannahhoward hannahhoward force-pushed the feat/less-restrictive-read-piece-lock branch from ec79856 to 7dc0910 Compare September 15, 2020 01:48
@magik6k magik6k merged commit 801e01b into master Sep 15, 2020
@magik6k magik6k deleted the feat/less-restrictive-read-piece-lock branch September 15, 2020 08:34
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

Successfully merging this pull request may close these issues.

None yet

2 participants