-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Add ReplicatedLogletController cluster scheduler component
- Loading branch information
Showing
3 changed files
with
613 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
title: Cluster Scheduler - Replicated loglet control | ||
--- | ||
stateDiagram-v2 | ||
|
||
[*] --> ObserveCluster | ||
|
||
state UpdateLogletSchedule { | ||
[*] --> ObtainLease | ||
state bootstrap_or_seal <<choice>> | ||
ObtainLease --> bootstrap_or_seal | ||
bootstrap_or_seal --> SealPreviousLoglet: loglet exists | ||
bootstrap_or_seal --> CreateNewLoglet | ||
SealPreviousLoglet --> CreateNewLoglet | ||
CreateNewLoglet --> SelectSequencer | ||
SelectSequencer --> WriteUpdatedLogletParams | ||
WriteUpdatedLogletParams --> DropLease | ||
DropLease --> [*] | ||
} | ||
|
||
note left of UpdateLogletSchedule | ||
Once the previous segment is sealed, | ||
call BifrostAdmin.add_segment_with_params for | ||
each log that doesn't have an open loglet. | ||
This must be done exactly once even in the presence | ||
of multiple admin nodes running multiple schedulers. | ||
end note | ||
|
||
UpdateLogletSchedule --> Wait | ||
|
||
Wait --> ObserveCluster | ||
|
||
note right of Wait | ||
Wait for LogServers to pick up their assigned | ||
tasks; sequencers | ||
end note | ||
|
||
ObserveCluster --> Decide | ||
|
||
state some_updates <<choice>> | ||
Decide --> some_updates | ||
some_updates --> UpdateLogletSchedule: loglet update required | ||
some_updates --> ObserveCluster: nothing to do |
Oops, something went wrong.