github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/kv/kvserver/concurrency/testdata/concurrency_manager/uncertainty (about)

     1  # -------------------------------------------------------------
     2  # A transactional (txn2) read-only request runs into replicated
     3  # intent below its read timestamp. It informs the lock table and
     4  # pushes the intent's transaction (txn1) above its uncertainty
     5  # window. The push succeeds and the request is able to proceed.
     6  # -------------------------------------------------------------
     7  
     8  new-txn name=txn1 ts=10,1 epoch=0
     9  ----
    10  
    11  new-txn name=txn2 ts=12,1 epoch=0 maxts=15,1
    12  ----
    13  
    14  new-request name=req1 txn=txn2 ts=12,1
    15    get key=k
    16  ----
    17  
    18  sequence req=req1
    19  ----
    20  [1] sequence req1: sequencing request
    21  [1] sequence req1: acquiring latches
    22  [1] sequence req1: scanning lock table for conflicting locks
    23  [1] sequence req1: sequencing complete, returned guard
    24  
    25  handle-write-intent-error req=req1
    26    intent txn=txn1 key=k
    27  ----
    28  [2] handle write intent error req1: handled conflicting intents on "k", released latches
    29  
    30  debug-lock-table
    31  ----
    32  global: num=1
    33   lock: "k"
    34    holder: txn: 00000001-0000-0000-0000-000000000000, ts: 0.000000010,1, info: repl epoch: 0, seqs: [0]
    35  local: num=0
    36  
    37  sequence req=req1
    38  ----
    39  [3] sequence req1: re-sequencing request
    40  [3] sequence req1: acquiring latches
    41  [3] sequence req1: scanning lock table for conflicting locks
    42  [3] sequence req1: waiting in lock wait-queues
    43  [3] sequence req1: pushing timestamp of txn 00000001 above 0.000000015,1
    44  [3] sequence req1: blocked on select in concurrency_test.(*cluster).PushTransaction
    45  
    46  on-txn-updated txn=txn1 status=pending ts=15,2
    47  ----
    48  [-] update txn: increasing timestamp of txn1
    49  [3] sequence req1: resolving intent "k" for txn 00000001 with PENDING status
    50  [3] sequence req1: acquiring latches
    51  [3] sequence req1: scanning lock table for conflicting locks
    52  [3] sequence req1: sequencing complete, returned guard
    53  
    54  finish req=req1
    55  ----
    56  [-] finish req1: finishing request
    57  
    58  reset namespace
    59  ----
    60  
    61  # -------------------------------------------------------------
    62  # A transactional (txn2) read-only request runs into replicated
    63  # intent above its read timestamp but in its uncertainty window.
    64  # It informs the lock table and pushes the intent's transaction
    65  # (txn1) above its uncertainty window. The push succeeds and the
    66  # request is able to proceed.
    67  # -------------------------------------------------------------
    68  
    69  new-txn name=txn1 ts=14,1 epoch=0
    70  ----
    71  
    72  new-txn name=txn2 ts=12,1 epoch=0 maxts=15,1
    73  ----
    74  
    75  new-request name=req1 txn=txn2 ts=12,1
    76    get key=k
    77  ----
    78  
    79  sequence req=req1
    80  ----
    81  [1] sequence req1: sequencing request
    82  [1] sequence req1: acquiring latches
    83  [1] sequence req1: scanning lock table for conflicting locks
    84  [1] sequence req1: sequencing complete, returned guard
    85  
    86  handle-write-intent-error req=req1
    87    intent txn=txn1 key=k
    88  ----
    89  [2] handle write intent error req1: handled conflicting intents on "k", released latches
    90  
    91  debug-lock-table
    92  ----
    93  global: num=1
    94   lock: "k"
    95    holder: txn: 00000001-0000-0000-0000-000000000000, ts: 0.000000014,1, info: repl epoch: 0, seqs: [0]
    96  local: num=0
    97  
    98  sequence req=req1
    99  ----
   100  [3] sequence req1: re-sequencing request
   101  [3] sequence req1: acquiring latches
   102  [3] sequence req1: scanning lock table for conflicting locks
   103  [3] sequence req1: waiting in lock wait-queues
   104  [3] sequence req1: pushing timestamp of txn 00000001 above 0.000000015,1
   105  [3] sequence req1: blocked on select in concurrency_test.(*cluster).PushTransaction
   106  
   107  on-txn-updated txn=txn1 status=pending ts=15,2
   108  ----
   109  [-] update txn: increasing timestamp of txn1
   110  [3] sequence req1: resolving intent "k" for txn 00000001 with PENDING status
   111  [3] sequence req1: acquiring latches
   112  [3] sequence req1: scanning lock table for conflicting locks
   113  [3] sequence req1: sequencing complete, returned guard
   114  
   115  finish req=req1
   116  ----
   117  [-] finish req1: finishing request
   118  
   119  reset namespace
   120  ----