Created
May 18, 2020 09:52
-
-
Save alexott/2d5bf95a791450d5dc3e5f5ee11fc94c to your computer and use it in GitHub Desktop.
Execution of Cassandra's logged batch
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
@startuml | |
hide footbox | |
participant "Client" as client | |
database "Coordinator DSE node" as cnode | |
database "Batchlog DSE nodes" as bnode | |
database "DSE Nodes" as onode | |
alt successful case | |
client -> cnode: send batch request | |
activate cnode | |
cnode -> bnode: 2 copies of batchlog\n(could be less in some edge cases) | |
bnode --> cnode: confirmed | |
alt successful batch execution | |
loop number of statements (done async) | |
cnode -> onode: execute statements | |
onode --> cnode: result | |
end | |
cnode -> bnode: remove batchlog | |
cnode --> client: confirm execution | |
deactivate cnode | |
else batch execution failed | |
cnode --> client: batch write timeout | |
loop until applied | |
activate bnode | |
bnode --> bnode: detects that batch still exist | |
loop number of statements (done async) | |
bnode -> onode: execute statements | |
onode --> bnode: result | |
end | |
bnode -> bnode: remove batchlog from other nodes | |
deactivate bnode | |
end | |
end | |
else batchlog write problem | |
cnode --> client: batchlog write timeout | |
client -> cnode: retry request | |
note right of cnode: retry request on other coordinator | |
end | |
@enduml |
Author
alexott
commented
May 18, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment