-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: sealing: Sector upgrade queue #8330
Changes from all commits
aef2ec5
193c848
8600ae2
628102a
799d3eb
4ded059
4d47394
e7ee5b5
724d80c
aac1f5a
3f23cf0
2961f3b
3b2a1ea
60ba133
a431fdb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,6 +111,7 @@ var fsmPlanners = map[SectorState]func(events []statemachine.Event, state *Secto | |
Committing: planCommitting, | ||
CommitFinalize: planOne( | ||
on(SectorFinalized{}, SubmitCommit), | ||
on(SectorFinalizedAvailable{}, SubmitCommit), | ||
on(SectorFinalizeFailed{}, CommitFinalizeFailed), | ||
), | ||
SubmitCommit: planOne( | ||
|
@@ -136,6 +137,7 @@ var fsmPlanners = map[SectorState]func(events []statemachine.Event, state *Secto | |
|
||
FinalizeSector: planOne( | ||
on(SectorFinalized{}, Proving), | ||
on(SectorFinalizedAvailable{}, Available), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the point of FinalizedAvailable? Why not instead go to Available from proving if the MakeCCSectorsAvailable config is set? That way we can avoid coupling with CommitFinalize. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can't really distinguish CC sectors already in the proving state from CC sectors entering the proving state (that's because on restart we run all state handlers for current states of all sectors). If we were to do that without tracking existing CC sectors, all CC sectors would get converted to Other things we could do instead of this event:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks makes sense. That run all state handlers on restart fact is pretty important. |
||
on(SectorFinalizeFailed{}, FinalizeFailed), | ||
), | ||
|
||
|
@@ -283,7 +285,11 @@ var fsmPlanners = map[SectorState]func(events []statemachine.Event, state *Secto | |
Proving: planOne( | ||
on(SectorFaultReported{}, FaultReported), | ||
on(SectorFaulty{}, Faulty), | ||
on(SectorMarkForUpdate{}, Available), | ||
), | ||
Available: planOne( | ||
on(SectorStartCCUpdate{}, SnapDealsWaitDeals), | ||
on(SectorAbortUpgrade{}, Proving), | ||
), | ||
Terminating: planOne( | ||
on(SectorTerminating{}, TerminateWait), | ||
|
@@ -558,6 +564,8 @@ func (m *Sealing) plan(events []statemachine.Event, state *SectorInfo) (func(sta | |
// Post-seal | ||
case Proving: | ||
return m.handleProvingSector, processed, nil | ||
case Available: | ||
return m.handleAvailableSector, processed, nil | ||
case Terminating: | ||
return m.handleTerminating, processed, nil | ||
case TerminateWait: | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice