title Commit participantgroup **Client** (NativeAPI.actor.cpp) participant "Transaction::commit" as tC participant "commitAndWatch" as cAW participant "tryCommit" as Commit participant "watchValue" as wV end participantgroup **CommitProxy** (CommitProxyServer.actor.cpp) participant "commitBatcher" as cB participant "commitBatch" as Batch participant "TagPartitionedLogSystem" as TPLS end participantgroup **Master** participant "getVersion" as gV participant "serveLiveCommittedVersion" as sLCV end participantgroup **Resolver** (Resolver.actor.cpp) participant "resolveBatch" as rB end participantgroup **TLog** (TLogServer.actor.cpp) participant "tLogCommit" as tLC end participantgroup **Storage Server** (storageserver.actor.cpp) participant "serveWatchValueRequests" as sWVR end autoactivation off tC -> cAW: cAW -> Commit: CommitTransactionRequest note right of Commit: //CommitAttachID// note right of Commit: NativeAPI.commit.Before Commit -> cB: CommitTransactionRequest loop Batch requests box over cB: Batch commit requests end cB -> Batch: Batched CommitTransactionRequests note right of Batch: --CommitProxyServer.batcher-- box over Batch: Preresolution note right of Batch: GettingCommitVersion Batch -> gV: GetCommitVersionRequest gV -> Batch: GetCommitVersionReply note right of Batch: GotCommitVersion box over Batch: Resolve Batch -> rB: ResolveTransactionBatchRequest note right of rB: Before box over rB: Wait for memory/needed version note right of rB: AfterQueueSizeCheck box over rB: Wait for resolver version note right of rB: AfterOrderer box over rB: Resolve the conflicts note right of rB: After rB --> Batch: ResolveTransactionBatchReply note right of Batch: ProcessingMutations box over Batch: Calculate the metadata box over Batch: Determine which transactions should be committed box over Batch: Assign storage server tags to mutations loop Wait txn commit version enter the MVCC window Batch -> sLCV: GetRawCommittedVersionRequest sLCV --> Batch: GetRawCommittedVersionReply end note right of Batch: AfterStoreCommits Batch -> TPLS: Version, LogPushData TPLS -> tLC: TLogCommitRequest note right of tLC: //CommitAttachID// note right of tLC: BeforeWaitForVersion box over tLC: Wait for the version note right of tLC: Before box over tLC: Store the commit box over tLC: Put commit into persistent queue note right of tLC: AfterTLogCommit box over tLC: Wait all prior message being committed note right of tLC: After tLC --> TPLS: TLogCommitReply TPLS -> Batch: Version (min) note right of Batch: AfterLogPush Batch --> Commit: CommitID note right of Commit: --NativeAPI.commit.After-- Commit --> cAW: cAW -> wV: Version note right of wV: //WatchValueAttachID// note right of wV: Before wV -> sWVR: WatchValueRequest note right of sWVR: --watchValueQ.Before-- box over sWVR: Ensure version is not too old note right of sWVR: --watchValueQ.AfterVersion-- loop Value not change box over sWVR: Check storageserver::getValueQ note right of sWVR: --watchValueQ.AfterRead-- end sWVR --> wV: Version note right of wV: After cAW --> tC: