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

fix: Improve supraseal batch ref tracking #316

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

magik6k
Copy link
Collaborator

@magik6k magik6k commented Nov 5, 2024

This rewrites the local batch ref tracker to:

  • Track individual sectors
  • Sync state with the DB

In the local tracker there are now 3 states for "slots":

  • No sector refs - batch can take more work
  • work=true - currently ongoing batch seal task
  • Sector refs, work=false - waiting for C1 / Finalize - refs removed from the DB will eventually be removed from the local tracker

Copy link
Contributor

@LexLuthr LexLuthr left a comment

Choose a reason for hiding this comment

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

Shouldn't s.lk.Lock() be s.cond.L.Lock()?

@magik6k
Copy link
Collaborator Author

magik6k commented Nov 6, 2024

That's the same lock, the cond is created with sm.cond = sync.NewCond(&sm.lk)

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.

2 participants