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

     1  # -------------------------------------------------------------
     2  # Read-only request runs into replicated intent. It informs the
     3  # lock-table and waits for the intent to be resolved.
     4  # -------------------------------------------------------------
     5  
     6  new-txn name=txn1 ts=10,1 epoch=0
     7  ----
     8  
     9  new-txn name=txn2 ts=12,1 epoch=0
    10  ----
    11  
    12  new-request name=req1 txn=txn2 ts=12,1
    13    get key=k
    14  ----
    15  
    16  sequence req=req1
    17  ----
    18  [1] sequence req1: sequencing request
    19  [1] sequence req1: acquiring latches
    20  [1] sequence req1: scanning lock table for conflicting locks
    21  [1] sequence req1: sequencing complete, returned guard
    22  
    23  handle-write-intent-error req=req1
    24    intent txn=txn1 key=k
    25  ----
    26  [2] handle write intent error req1: handled conflicting intents on "k", released latches
    27  
    28  debug-lock-table
    29  ----
    30  global: num=1
    31   lock: "k"
    32    holder: txn: 00000001-0000-0000-0000-000000000000, ts: 0.000000010,1, info: repl epoch: 0, seqs: [0]
    33  local: num=0
    34  
    35  sequence req=req1
    36  ----
    37  [3] sequence req1: re-sequencing request
    38  [3] sequence req1: acquiring latches
    39  [3] sequence req1: scanning lock table for conflicting locks
    40  [3] sequence req1: waiting in lock wait-queues
    41  [3] sequence req1: pushing timestamp of txn 00000001 above 0.000000012,1
    42  [3] sequence req1: blocked on select in concurrency_test.(*cluster).PushTransaction
    43  
    44  on-txn-updated txn=txn1 status=aborted
    45  ----
    46  [-] update txn: aborting txn1
    47  [3] sequence req1: resolving intent "k" for txn 00000001 with ABORTED status
    48  [3] sequence req1: acquiring latches
    49  [3] sequence req1: scanning lock table for conflicting locks
    50  [3] sequence req1: sequencing complete, returned guard
    51  
    52  finish req=req1
    53  ----
    54  [-] finish req1: finishing request
    55  
    56  reset namespace
    57  ----
    58  
    59  # -------------------------------------------------------------
    60  # Read-only request runs into replicated intent while the
    61  # lock-table is disabled. The lock-table cannot store the lock,
    62  # so the request is forced to push (PUSH_TIMESTAMP) immediately.
    63  # -------------------------------------------------------------
    64  
    65  new-txn name=txn1 ts=10,1 epoch=0
    66  ----
    67  
    68  new-txn name=txn2 ts=12,1 epoch=0
    69  ----
    70  
    71  new-request name=req1 txn=txn2 ts=12,1
    72    get key=k
    73  ----
    74  
    75  on-lease-updated leaseholder=false
    76  ----
    77  [-] transfer lease: released
    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: pushing timestamp of txn 00000001 above 0.000000012,1
    90  [2] handle write intent error req1: blocked on select in concurrency_test.(*cluster).PushTransaction
    91  
    92  on-txn-updated txn=txn1 status=aborted
    93  ----
    94  [-] update txn: aborting txn1
    95  [2] handle write intent error req1: resolving intent "k" for txn 00000001 with ABORTED status
    96  [2] handle write intent error req1: handled conflicting intents on "k", released latches
    97  
    98  debug-lock-table
    99  ----
   100  global: num=0
   101  local: num=0
   102  
   103  sequence req=req1
   104  ----
   105  [3] sequence req1: re-sequencing request
   106  [3] sequence req1: acquiring latches
   107  [3] sequence req1: scanning lock table for conflicting locks
   108  [3] sequence req1: sequencing complete, returned guard
   109  
   110  finish req=req1
   111  ----
   112  [-] finish req1: finishing request
   113  
   114  reset namespace
   115  ----
   116  
   117  # -------------------------------------------------------------
   118  # Read-write request runs into replicated intent while the
   119  # lock-table is disabled. The lock-table cannot store the lock,
   120  # so the request is forced to push (PUSH_ABORT) immediately.
   121  # -------------------------------------------------------------
   122  
   123  new-txn name=txn1 ts=10,1 epoch=0
   124  ----
   125  
   126  new-txn name=txn2 ts=12,1 epoch=0
   127  ----
   128  
   129  new-request name=req1 txn=txn2 ts=12,1
   130    put key=k value=v
   131  ----
   132  
   133  on-lease-updated leaseholder=false
   134  ----
   135  [-] transfer lease: released
   136  
   137  sequence req=req1
   138  ----
   139  [1] sequence req1: sequencing request
   140  [1] sequence req1: acquiring latches
   141  [1] sequence req1: scanning lock table for conflicting locks
   142  [1] sequence req1: sequencing complete, returned guard
   143  
   144  handle-write-intent-error req=req1
   145    intent txn=txn1 key=k
   146  ----
   147  [2] handle write intent error req1: pushing txn 00000001 to abort
   148  [2] handle write intent error req1: blocked on select in concurrency_test.(*cluster).PushTransaction
   149  
   150  on-txn-updated txn=txn1 status=aborted
   151  ----
   152  [-] update txn: aborting txn1
   153  [2] handle write intent error req1: resolving intent "k" for txn 00000001 with ABORTED status
   154  [2] handle write intent error req1: handled conflicting intents on "k", released latches
   155  
   156  debug-lock-table
   157  ----
   158  global: num=0
   159  local: num=0
   160  
   161  sequence req=req1
   162  ----
   163  [3] sequence req1: re-sequencing request
   164  [3] sequence req1: acquiring latches
   165  [3] sequence req1: scanning lock table for conflicting locks
   166  [3] sequence req1: sequencing complete, returned guard
   167  
   168  finish req=req1
   169  ----
   170  [-] finish req1: finishing request
   171  
   172  reset namespace
   173  ----
   174  
   175  # -------------------------------------------------------------
   176  # Read-write request runs into replicated intent while the
   177  # lock-table is disabled. The lock-table cannot store the lock,
   178  # so the request is forced to push (PUSH_ABORT) immediately.
   179  # The request's own transaction is aborted while pushing.
   180  # -------------------------------------------------------------
   181  
   182  new-txn name=txn1 ts=10,1 epoch=0
   183  ----
   184  
   185  new-txn name=txn2 ts=12,1 epoch=0
   186  ----
   187  
   188  new-request name=req1 txn=txn2 ts=12,1
   189    get key=k
   190  ----
   191  
   192  on-lease-updated leaseholder=false
   193  ----
   194  [-] transfer lease: released
   195  
   196  sequence req=req1
   197  ----
   198  [1] sequence req1: sequencing request
   199  [1] sequence req1: acquiring latches
   200  [1] sequence req1: scanning lock table for conflicting locks
   201  [1] sequence req1: sequencing complete, returned guard
   202  
   203  handle-write-intent-error req=req1
   204    intent txn=txn1 key=k
   205  ----
   206  [2] handle write intent error req1: pushing timestamp of txn 00000001 above 0.000000012,1
   207  [2] handle write intent error req1: blocked on select in concurrency_test.(*cluster).PushTransaction
   208  
   209  on-txn-updated txn=txn2 status=aborted
   210  ----
   211  [-] update txn: aborting txn2
   212  [2] handle write intent error req1: detected pusher aborted
   213  [2] handle write intent error req1: handled conflicting intents on "k", returned error: TransactionAbortedError(ABORT_REASON_PUSHER_ABORTED): <nil>
   214  
   215  debug-lock-table
   216  ----
   217  global: num=0
   218  local: num=0
   219  
   220  reset namespace
   221  ----