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

Monitor sectors unsealed state #1191

Merged
merged 13 commits into from
Apr 17, 2023
Merged

Monitor sectors unsealed state #1191

merged 13 commits into from
Apr 17, 2023

Conversation

dirkmc
Copy link
Contributor

@dirkmc dirkmc commented Feb 16, 2023

Fixes #1002, #1199

TODO:

  • DB migration to add SectorState table
  • Create and start UnsealedStateManager from index provider Wrapper
  • Tests
2023-02-20T14:12:27.850+0100    INFO    unsmgr  indexprovider/unsealedstatemanager.go:65
checking for sector state updates
2023-02-20T14:12:28.005+0100    INFO    unsmgr  indexprovider/unsealedstatemanager.go:102
announced to index provider that deal has been removed
{"deal id": "06d6f679-4b5d-4e67-a770-6f9d250163e8", "sector id": "3", "announce cid": "baguqeerab73i3jviouwzblbcduajb3zd223ouhpebanqitsetcn6tzae3eiq"}

@dirkmc dirkmc force-pushed the feat/update-idx-unseal branch 2 times, most recently from a31b4e2 to d8adb7f Compare February 16, 2023 15:23
@dirkmc dirkmc force-pushed the feat/update-idx-unseal branch 2 times, most recently from aa882e6 to 615d6d8 Compare February 20, 2023 13:15
@dirkmc dirkmc marked this pull request as ready for review February 20, 2023 13:17
@dirkmc dirkmc requested a review from jacobheun February 20, 2023 13:43
Comment on lines +62 to +65
err := m.checkForUpdates(ctx)
if err != nil {
usmlog.Errorf("error checking for unsealed state updates: %s", err)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to wrap this with a timer, so that we build intuition on how long this process takes depending on how many sectors/deals there are in the database.

@jacobheun jacobheun assigned jacobheun and dirkmc and unassigned jacobheun Mar 20, 2023
@dirkmc dirkmc force-pushed the feat/update-idx-unseal branch from 9b1cb77 to a3fdec2 Compare April 5, 2023 09:20
@dirkmc dirkmc force-pushed the feat/update-idx-unseal branch from 409cd4a to eab042b Compare April 5, 2023 09:39
* feat: redeclare storage when unsealed state is checked

This is currently needed as lotus doesnt automatically update when the fs changes

* chore: fix linting

* feat: make unsealedstatemanager configurable

*Update default duration to 12hours from 1hour

*Allow users to disabl redeclaration of storage

chore: make gen

* refactor: move storage list to 1hour interval
Copy link
Contributor

@jacobheun jacobheun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With #1377 merged in this is good to go, yay index consistency!

@jacobheun jacobheun merged commit 6b246d2 into main Apr 17, 2023
@jacobheun jacobheun deleted the feat/update-idx-unseal branch April 17, 2023 11:25
This was referenced Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Clarify the lifecycle of indexes with the lifecycle of a deal
3 participants