Skip to content

Commit

Permalink
Expand scan management state diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostwords committed Oct 13, 2023
1 parent 31e74a9 commit 689b3a0
Showing 1 changed file with 49 additions and 27 deletions.
76 changes: 49 additions & 27 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,44 +68,66 @@ This continues until all scans finish.
```mermaid
stateDiagram-v2
[*] --> PollForStatus
[*] --> ManageScans
state fork2 <<fork>>
PollForStatus --> fork2
ManageScans --> fork2
fork2 --> CheckBadgerScan1
fork2 --> CheckBadgerScan2
fork2 --> CheckBadgerScanN
state ManageInProgressScans {
err1: CheckForFailure
err2: CheckForFailure
err3: CheckForFailure
state PollInProgressScansForStatus {
chk1: CheckForFailure
rei1: BadgerInit
pro1: ExtractProgress
pro2: ExtractProgress
pro3: ExtractProgress
ter1: CheckForTermination
fin1: ExtractResults
fai1: ExtractErrorLog
del1: DeleteDroplet
sta1: CheckForStall
sta2: CheckForStall
sta3: CheckForStall
res1: RestartScan
ddd2: ...
ddd3: ...
state CheckBadgerScan1 {
[*] --> err1
err1 --> pro1
pro1 --> sta1
sta1 --> [*]
[*] --> chk1
state scan1_failed <<choice>>
chk1 --> scan1_failed
scan1_failed --> rei1 : Scan previously failed
scan1_failed --> pro1 : No error log found
rei1 --> [*]
pro1 --> ter1
state scan1_term <<choice>>
ter1 --> scan1_term
scan1_term --> fin1 : Scan finished
scan1_term --> fai1: Scan failed
scan1_term --> sta1 : Scan is still running
fin1 --> del1
fai1 --> del1
del1 --> [*]
state scan1_stall <<choice>>
sta1 --> scan1_stall
scan1_stall --> res1: Progress file is stale
scan1_stall --> [*] : Progress was updated recently
res1 --> [*]
}
--
state CheckBadgerScan2 {
[*] --> err2
err2 --> pro2
pro2 --> sta2
sta2 --> [*]
[*] --> ddd2
ddd2 --> [*]
}
--
state CheckBadgerScanN {
[*] --> err3
err3 --> pro3
pro3 --> sta3
sta3 --> [*]
[*] --> ddd3
ddd3 --> [*]
}
}
Expand All @@ -114,12 +136,12 @@ CheckBadgerScan1 --> join2
CheckBadgerScan2 --> join2
CheckBadgerScanN --> join2
state check1 <<choice>>
join2 --> check1
check1 --> PrintProgress : One or more scans still running
check1 --> MergeResults : All scans finished
state all_finished <<choice>>
join2 --> all_finished
all_finished --> PrintProgress : One or more scans still running or have failed
all_finished --> MergeResults : All scans completed successfully
PrintProgress --> PollForStatus
PrintProgress --> ManageScans
MergeResults --> [*]
```
Expand Down

0 comments on commit 689b3a0

Please sign in to comment.