github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/docs/tech-notes/txn_coord_sender/interceptors.puml (about)

     1  @startuml
     2  participant "client.Txn" as Txn
     3  participant TxnCoordSender
     4  participant interceptor1
     5  participant interceptor2
     6  participant txnSeqNumAllocator
     7  participant interceptor3
     8  participant txnSpanRefresher
     9  participant interceptor4
    10  participant DistSender
    11  
    12  Txn -> TxnCoordSender : Send(ba)
    13  TxnCoordSender -> TxnCoordSender : (some txn logic)
    14  TxnCoordSender -> interceptor1 : Send(ba)
    15  interceptor1 -> interceptor2 : Send(ba)
    16  interceptor2 -> txnSeqNumAllocator : Send(ba)
    17  txnSeqNumAllocator -> txnSeqNumAllocator : assign seqnums in batch
    18  txnSeqNumAllocator -> interceptor3 : Send(ba)
    19  interceptor3 -> txnSpanRefresher : Send(ba)
    20  txnSpanRefresher -> interceptor4 : Send(ba)
    21  interceptor4 -> DistSender : Send(ba)
    22  DistSender -> cluster : (distribute requests)
    23  ...
    24  cluster --> DistSender : (merge responses)
    25  DistSender --> interceptor4 : BatchResponse
    26  interceptor4 --> txnSpanRefresher : BatchResponse
    27  txnSpanRefresher --> txnSpanRefresher : (collect spans)
    28  txnSpanRefresher --> interceptor3 : BatchResponse
    29  interceptor3 --> txnSeqNumAllocator : BatchResponse
    30  txnSeqNumAllocator --> interceptor2 : BatchResponse
    31  interceptor2 --> interceptor1 : BatchResponse
    32  interceptor1 --> TxnCoordSender : BatchResponse
    33  TxnCoordSender -> TxnCoordSender : (some txn logic)
    34  TxnCoordSender --> Txn : BatchResponse
    35  @enduml