SHOW TRACE FOR SESSION

The SHOW TRACE FOR SESSION statement returns details about how CockroachDB executed a statement or series of statements recorded during a session. These details include messages and timing information from all nodes involved in the execution, providing visibility into the actions taken by CockroachDB across all of its software layers.

You can use SHOW TRACE FOR SESSION to debug why a query is not performing as expected, to add more information to bug reports, or to generally learn more about how CockroachDB works.

Usage overview

SHOW TRACE FOR SESSION returns messages and timing information for all statements recorded during a session. It's important to note the following:

  • SHOW TRACE FOR SESSION only returns the most recently recorded traces, or for a currently active recording of traces.

    • To start recording traces during a session, enable the tracing session variable via SET tracing = on;.
    • To stop recording traces during a session, disable the tracing session variable via SET tracing = off;.
  • Recording traces during a session does not effect the execution of any statements traced. This means that errors encountered by statements during a recording are returned to clients. CockroachDB will automatically retry individual statements (considered implicit transactions) and multi-statement transactions sent as a single batch when retry errors are encountered due to contention. Also, clients will receive retry errors required to handle client-side retries. As a result, traces of all transaction retries will be captured during a recording.

Required privileges

For SHOW TRACE FOR SESSION, no privileges are required.

Syntax

SHOWCOMPACTKVTRACEFORSESSION

Parameters

ParameterDescription
COMPACTIf specified, fewer columns are returned by the statement. See Response for more details.
KVIf specified, the returned messages are restricted to those describing requests to and responses from the underlying key-value storage layer, including per-result-row messages.For SHOW KV TRACE FOR SESSION, per-result-row messages are included only if the session was/is recording with SET tracing = kv;.

Trace description

CockroachDB's definition of a "trace" is a specialization of OpenTracing's definition. Internally, CockroachDB uses OpenTracing libraries for tracing, which also means thatit can be easily integrated with OpenTracing-compatible trace collectors; for example, Lightstep and Zipkin are already supported.

ConceptDescription
traceInformation about the sub-operations performed as part of a high-level operation (a query or a transaction). This information is internally represented as a tree of "spans", with a special "root span" representing a whole SQL transaction in the case of SHOW TRACE FOR SESSION.
spanA named, timed operation that describes a contiguous segment of work in a trace. Each span links to "child spans", representing sub-operations; their children would be sub-sub-operations of the grandparent span, etc.Different spans can represent (sub-)operations that executed either sequentially or in parallel with respect to each other. (This possibly-parallel nature of execution is one of the important things that a trace is supposed to describe.) The operations described by a trace may be distributed, that is, different spans may describe operations executed by different nodes.
messageA string with timing information. Each span can contain a list of these. They are produced by CockroachDB's logging infrastructure and are the same messages that can be found in node log files except that a trace contains message across all severity levels, whereas log files, by default, do not. Thus, a trace is much more verbose than logs but only contains messages produced in the context of one particular traced operation.

To further clarify these concepts, let's look at a visualization of a trace for one statement. This particular trace is visualized by Lightstep (docs on integrating Lightstep with CockroachDB coming soon). The image only shows spans, but in the tool, it would be possible drill down to messages. You can see names of operations and sub-operations, along with parent-child relationships and timing information, and it's easy to see which operations are executed in parallel.

Lightstep example

Response

Note:
The format of the SHOW TRACE FOR SESSION response may change in future versions.

CockroachDB outputs traces in linear tabular format. Each result row represents either a span start (identified by the === SPAN START: <operation> === message) or a log message from a span. Rows are generally listed in their timestamp order (i.e., the order in which the events they represent occurred) with the exception that messages from child spans are interleaved in the parent span according to their timing. Messages from sibling spans, however, are not interleaved with respect to one another.

The following diagram shows the order in which messages from different spans would be interleaved in an example trace. Each box is a span; inner-boxes are child spans. The numbers indicate the order in which the log messages would appear in the virtual table.

  1. +-----------------------+
  2. | 1 |
  3. | +-------------------+ |
  4. | | 2 | |
  5. | | +----+ | |
  6. | | | | +----+ | |
  7. | | | 3 | | 4 | | |
  8. | | | | | | 5 | |
  9. | | | | | | ++ | |
  10. | | +----+ | | | |
  11. | | +----+ | |
  12. | | 6 | |
  13. | +-------------------+ |
  14. | 7 |
  15. +-----------------------+

Each row contains the following columns:

ColumnTypeDescription
timestamptimestamptzThe absolute time when the message occurred.
ageintervalThe age of the message relative to the beginning of the trace (i.e., the beginning of the statement execution in the case of SHOW TRACE FOR <stmt> and the beginning of the recording in the case of SHOW TRACE FOR SESSION.
messagestringThe log message.
tagstringMeta-information about the message's context. This is the same information that appears in the beginning of log file messages in between square brackets (e.g, [client=[::1]:49985,user=root,n1]).
locationstringThe file:line location of the line of code that produced the message. Only some of the messages have this field set; it depends on specifically how the message was logged. The —vmodule flag passed to the node producing the message also affects what rows get this field populated. Generally, if —vmodule=<file>=<level> is specified, messages produced by that file will have the field populated.
operationstringThe name of the operation (or sub-operation) on whose behalf the message was logged.
spanintThe index of the span within the virtual list of all spans if they were ordered by the span's start time.

Note:
If the COMPACT keyword was specified, only the age, message, tag and operation columns are returned. In addition, the value of the location columns is prepended to message.

Examples

Trace a session

  1. > SET tracing = on;
  1. SET TRACING
  1. > SHOW TRACE FOR SESSION;
  1. +----------------------------------+---------------+-------------------------------------------------------+------------------------------------------------+----------+-----------------------------------+------+
  2. | timestamp | age | message | tag | location | operation | span |
  3. +----------------------------------+---------------+-------------------------------------------------------+------------------------------------------------+----------+-----------------------------------+------+
  4. | 2018-03-08 21:22:18.266373+00:00 | 0s | === SPAN START: sql txn === | | | sql txn | 0 |
  5. | 2018-03-08 21:22:18.267341+00:00 | 967µs713ns | === SPAN START: session recording === | | | session recording | 5 |
  6. | 2018-03-08 21:22:18.267343+00:00 | 969µs760ns | === SPAN START: starting plan === | | | starting plan | 1 |
  7. | 2018-03-08 21:22:18.267367+00:00 | 993µs551ns | === SPAN START: consuming rows === | | | consuming rows | 2 |
  8. | 2018-03-08 21:22:18.267384+00:00 | 1ms10µs504ns | Scan /Table/51/{1-2} | [n1,client=[::1]:58264,user=root] | | sql txn | 0 |
  9. | 2018-03-08 21:22:18.267434+00:00 | 1ms60µs392ns | === SPAN START: dist sender === | | | dist sender | 3 |
  10. | 2018-03-08 21:22:18.267444+00:00 | 1ms71µs136ns | querying next range at /Table/51/1 | [client=[::1]:58264,user=root,txn=76d25cda,n1] | | dist sender | 3 |
  11. | 2018-03-08 21:22:18.267462+00:00 | 1ms88µs421ns | r20: sending batch 1 Scan to (n1,s1):1 | [client=[::1]:58264,user=root,txn=76d25cda,n1] | | dist sender | 3 |
  12. | 2018-03-08 21:22:18.267465+00:00 | 1ms91µs570ns | sending request to local server | [client=[::1]:58264,user=root,txn=76d25cda,n1] | | dist sender | 3 |
  13. | 2018-03-08 21:22:18.267467+00:00 | 1ms93µs707ns | === SPAN START: /cockroach.roachpb.Internal/Batch === | | | /cockroach.roachpb.Internal/Batch | 4 |
  14. | 2018-03-08 21:22:18.267469+00:00 | 1ms96µs103ns | 1 Scan | [n1] | | /cockroach.roachpb.Internal/Batch | 4 |
  15. | 2018-03-08 21:22:18.267471+00:00 | 1ms97µs437ns | read has no clock uncertainty | [n1] | | /cockroach.roachpb.Internal/Batch | 4 |
  16. | 2018-03-08 21:22:18.267474+00:00 | 1ms101µs60ns | executing 1 requests | [n1,s1] | | /cockroach.roachpb.Internal/Batch | 4 |
  17. | 2018-03-08 21:22:18.267479+00:00 | 1ms105µs912ns | read-only path | [n1,s1,r20/1:/Table/5{1-2}] | | /cockroach.roachpb.Internal/Batch | 4 |
  18. | 2018-03-08 21:22:18.267483+00:00 | 1ms110µs94ns | command queue | [n1,s1,r20/1:/Table/5{1-2}] | | /cockroach.roachpb.Internal/Batch | 4 |
  19. | 2018-03-08 21:22:18.267487+00:00 | 1ms114µs240ns | waiting for read lock | [n1,s1,r20/1:/Table/5{1-2}] | | /cockroach.roachpb.Internal/Batch | 4 |
  20. | 2018-03-08 21:22:18.26752+00:00 | 1ms146µs596ns | read completed | [n1,s1,r20/1:/Table/5{1-2}] | | /cockroach.roachpb.Internal/Batch | 4 |
  21. | 2018-03-08 21:22:18.267566+00:00 | 1ms192µs724ns | plan completed execution | [n1,client=[::1]:58264,user=root] | | consuming rows | 2 |
  22. | 2018-03-08 21:22:18.267568+00:00 | 1ms195µs60ns | resources released, stopping trace | [n1,client=[::1]:58264,user=root] | | consuming rows | 2 |
  23. +----------------------------------+---------------+-------------------------------------------------------+------------------------------------------------+----------+-----------------------------------+------+
  24. (19 rows)

Trace conflicting transactions

In this example, we use two terminals concurrently to generate conflicting transactions.

  • In terminal 1, create a table:
  1. > CREATE TABLE t (k INT);
  • Still in terminal 1, open a transaction and perform a write without closing the transaction:
  1. > BEGIN;
  1. > INSERT INTO t VALUES (1);

Press enter one more time to send these statements to the server.

  • In terminal 2, turn tracing on:
  1. > SET tracing = on;
  • Still in terminal 2, execute a conflicting read:
  1. > SELECT * FROM t;

You'll see that this statement is blocked until the transaction in terminal 1 finishes.

  • Back in terminal 1, finish the transaction:
  1. > COMMIT;
  • In terminal 2, you'll see the completed read:
  1. +---+
  2. | k |
  3. +---+
  4. | 1 |
  5. +---+
  • Still in terminal 2, stop tracing and then view the completed trace:

Tip:
Check the lines starting with #Annotation for insights into how the conflict is traced.

  1. +--------------------+------+--------------------------------------------------------------------------+
  2. | age | span | message |
  3. +--------------------+------+--------------------------------------------------------------------------+
  4. | 0s | 0 | === SPAN START: session recording === |
  5. | 26µs841ns | 0 | [NoTxn pos:25] executing Sync |
  6. | 214µs31ns | 0 | [NoTxn pos:26] executing ExecStmt: SHOW TRANSACTION STATUS |
  7. ...
  8. | 6s289ms100µs820ns | 3 | === SPAN START: sql txn === |
  9. | 6s289ms136µs804ns | 3 | [Open pos:34] executing ExecStmt: SELECT * FROM t |
  10. | 6s289ms147µs236ns | 3 | executing: SELECT * FROM t in state: Open |
  11. | 6s289ms169µs623ns | 3 | planning starts: SELECT |
  12. | 6s289ms171µs400ns | 3 | generating optimizer plan |
  13. | 6s289ms203µs35ns | 3 | added table 'defaultdb.public.t' to table collection |
  14. | 6s289ms300µs796ns | 3 | optimizer plan succeeded |
  15. | 6s289ms301µs851ns | 3 | planning ends |
  16. | 6s289ms305µs338ns | 3 | checking distributability |
  17. | 6s289ms308µs608ns | 3 | distributable plan: true |
  18. | 6s289ms314µs399ns | 3 | execution starts: distributed |
  19. | 6s289ms315µs380ns | 4 | === SPAN START: consuming rows === |
  20. | 6s289ms327µs736ns | 3 | creating DistSQL plan |
  21. | 6s289ms360µs73ns | 3 | querying next range at /Table/52/1 |
  22. | 6s289ms397µs745ns | 3 | running DistSQL plan |
  23. | 6s289ms411µs676ns | 5 | === SPAN START: flow === |
  24. | 6s289ms459µs347ns | 5 | starting (1 processors, 0 startables) |
  25. | 6s289ms476µs196ns | 8 | === SPAN START: table reader === |
  26. | | | |
  27. | | | cockroach.stat.tablereader.stalltime: 7µs |
  28. | | | |
  29. | | | cockroach.processorid: 0 |
  30. | | | |
  31. | | | cockroach.stat.tablereader.input.rows: 2 |
  32. | 6s290ms23µs213ns | 8 | Scan /Table/52/{1-2} |
  33. | 6s290ms39µs563ns | 9 | === SPAN START: dist sender === |
  34. | 6s290ms82µs250ns | 9 | querying next range at /Table/52/1 |
  35. | 6s290ms106µs319ns | 9 | r23: sending batch 1 Scan to (n1,s1):1 |
  36. | 6s290ms112µs72ns | 9 | sending request to local server |
  37. | 6s290ms156µs75ns | 10 | === SPAN START: /cockroach.roachpb.Internal/Batch === |
  38. | 6s290ms160µs422ns | 10 | 1 Scan |
  39. | 6s290ms166µs984ns | 10 | executing 1 requests |
  40. | 6s290ms175µs94ns | 10 | read-only path |
  41. | 6s290ms179µs708ns | 10 | read has no clock uncertainty |
  42. | 6s290ms186µs84ns | 10 | command queue |
  43. | 6s290ms203µs789ns | 10 | waiting for read lock |
  44. | # Annotation: The following line identifies the conflict and describes the conflict resolution. |
  45. | 6s290ms318µs839ns | 10 | conflicting intents on /Table/52/1/372254698480435201/0 |
  46. | 6s290ms337µs353ns | 10 | replica.Send got error: conflicting intents on |
  47. | | | /Table/52/1/372254698480435201/0 |
  48. | 6s290ms352µs992ns | 10 | adding f4a8193b to contention queue on intent |
  49. | | | /Table/52/1/372254698480435201/0 @c4203a16 |
  50. | # Annotation: The read is now going to wait for the writer to finish by executing a PushTxn request. |
  51. | 6s290ms362µs345ns | 10 | pushing 1 transaction(s) |
  52. | 6s290ms370µs927ns | 11 | === SPAN START: dist sender === |
  53. | 6s290ms378µs722ns | 11 | querying next range at /Table/52/1/372254698480435201/0 |
  54. | 6s290ms389µs560ns | 11 | r23: sending batch 1 PushTxn to (n1,s1):1 |
  55. | 6s290ms392µs349ns | 11 | sending request to local server |
  56. | 6s290ms455µs709ns | 12 | === SPAN START: /cockroach.roachpb.Internal/Batch === |
  57. | 6s290ms461µs351ns | 12 | 1 PushTxn |
  58. | 6s290ms464µs607ns | 12 | executing 1 requests |
  59. | 6s290ms471µs394ns | 12 | read-write path |
  60. | 6s290ms476µs558ns | 12 | command queue |
  61. | 6s290ms484µs12ns | 12 | applied timestamp cache |
  62. | 6s290ms593µs363ns | 12 | evaluated request |
  63. | 6s290ms606µs183ns | 12 | replica.Send got error: failed to push "sql txn" id=c4203a16 |
  64. | | | key=/Table/52/1/372254698480435201/0 rw=true pri=0.03424799 |
  65. | | | iso=SERIALIZABLE stat=PENDING epo=0 ts=1533673518.429352831,0 |
  66. | | | orig=1533673518.429352831,0 max=1533673518.429352831,0 wto=false |
  67. | | | rop=false seq=1 |
  68. | 6s290ms617µs794ns | 12 | f4a8193b pushing c4203a16 (1 pending) |
  69. | 6s290ms655µs798ns | 12 | querying pushee |
  70. ...
  71. | 11s777ms251µs907ns | 20 | === SPAN START: /cockroach.roachpb.Internal/Batch === |
  72. | 11s777ms261µs211ns | 20 | 1 QueryTxn |
  73. | 11s777ms286µs672ns | 20 | executing 1 requests |
  74. | 11s777ms300µs370ns | 20 | read-only path |
  75. | 11s777ms371µs665ns | 20 | command queue |
  76. | 11s777ms393µs277ns | 20 | waiting for 1 overlapping requests |
  77. | 11s779ms520µs651ns | 20 | waited 2.113298ms for overlapping requests |
  78. | 11s779ms543µs461ns | 20 | waiting for read lock |
  79. | 11s779ms641µs611ns | 20 | read completed |
  80. | 12s440ms469µs377ns | 12 | result of pending push: "sql txn" id=c4203a16 |
  81. | | | key=/Table/52/1/372254698480435201/0 rw=true pri=0.03424799 |
  82. | | | iso=SERIALIZABLE stat=COMMITTED epo=0 ts=1533673518.429352831,0 |
  83. | | | orig=1533673518.429352831,0 max=1533673518.429352831,0 wto=false |
  84. | | | rop=false seq=3 |
  85. | # Annotation: The writer is detected to have finished. |
  86. | 12s440ms473µs127ns | 12 | push request is satisfied |
  87. | 12s440ms546µs916ns | 10 | c4203a16-78c5-4841-92f3-9a0c966ba9db is now COMMITTED |
  88. | # Annotation: The write has committed. Some cleanup follows. |
  89. | 12s440ms551µs686ns | 10 | resolving intents [wait=false] |
  90. | 12s440ms603µs878ns | 21 | === SPAN START: dist sender === |
  91. | 12s440ms648µs131ns | 21 | querying next range at /Table/52/1/372254698480435201/0 |
  92. | 12s440ms692µs427ns | 21 | r23: sending batch 1 ResolveIntent to (n1,s1):1 |
  93. | 12s440ms699µs732ns | 21 | sending request to local server |
  94. | 12s440ms703µs670ns | 22 | === SPAN START: /cockroach.roachpb.Internal/Batch === |
  95. | 12s440ms708µs476ns | 22 | 1 ResolveIntent |
  96. | 12s440ms714µs221ns | 22 | executing 1 requests |
  97. | 12s440ms720µs853ns | 22 | read-write path |
  98. | 12s440ms733µs90ns | 22 | command queue |
  99. | 12s440ms742µs916ns | 22 | applied timestamp cache |
  100. | 12s440ms831µs18ns | 22 | evaluated request |
  101. | 12s440ms857µs118ns | 10 | read-only path |
  102. | 12s440ms860µs848ns | 10 | read has no clock uncertainty |
  103. | 12s440ms867µs261ns | 10 | command queue |
  104. | 12s440ms873µs171ns | 10 | waiting for read lock |
  105. | # Annotation: This is where we would have been if there hadn't been a conflict. |
  106. | 12s440ms913µs370ns | 10 | read completed |
  107. | 12s440ms961µs323ns | 10 | f4a8193b finished, leaving intent? false (owned by <nil>) |
  108. | 12s441ms989µs325ns | 3 | execution ends |
  109. | 12s441ms991µs398ns | 3 | rows affected: 2 |
  110. | 12s442ms22µs953ns | 3 | AutoCommit. err: <nil> |
  111. | 12s442ms44µs376ns | 0 | releasing 1 tables |
  112. | 12s442ms57µs49ns | 0 | [NoTxn pos:35] executing Sync |
  113. | 12s442ms449µs324ns | 0 | [NoTxn pos:36] executing ExecStmt: SHOW TRANSACTION STATUS |
  114. | 12s442ms457µs347ns | 0 | executing: SHOW TRANSACTION STATUS in state: NoTxn |
  115. | 12s442ms466µs126ns | 0 | [NoTxn pos:37] executing Sync |
  116. | 12s442ms586µs65ns | 0 | [NoTxn pos:38] executing ExecStmt: SHOW database |
  117. | 12s442ms591µs342ns | 0 | executing: SHOW database in state: NoTxn |
  118. | 12s442ms599µs279ns | 6 | === SPAN START: sql txn === |
  119. | 12s442ms621µs543ns | 6 | [Open pos:38] executing ExecStmt: SHOW database |
  120. | 12s442ms624µs632ns | 6 | executing: SHOW database in state: Open |
  121. | 12s442ms639µs579ns | 6 | planning starts: SHOW |
  122. | 12s442ms641µs610ns | 6 | generating optimizer plan |
  123. | 12s442ms657µs397ns | 6 | optimizer plan failed: unsupported statement: *tree.ShowVar |
  124. | 12s442ms659µs345ns | 6 | optimizer falls back on heuristic planner |
  125. | 12s442ms666µs926ns | 6 | query is correlated: false |
  126. | 12s442ms667µs859ns | 6 | heuristic planner starts |
  127. | 12s442ms765µs327ns | 6 | heuristic planner optimizes plan |
  128. | 12s442ms811µs772ns | 6 | heuristic planner optimizes subqueries |
  129. | 12s442ms812µs988ns | 6 | planning ends |
  130. | 12s442ms815µs950ns | 6 | checking distributability |
  131. | 12s442ms825µs105ns | 6 | query not supported for distSQL: unsupported node *sql.valuesNode |
  132. | 12s442ms826µs599ns | 6 | distributable plan: false |
  133. | 12s442ms828µs79ns | 6 | execution starts: local |
  134. | 12s442ms832µs803ns | 7 | === SPAN START: consuming rows === |
  135. | 12s442ms845µs752ns | 6 | execution ends |
  136. | 12s442ms846µs750ns | 6 | rows affected: 1 |
  137. | 12s442ms860µs278ns | 6 | AutoCommit. err: <nil> |
  138. | 12s442ms869µs681ns | 0 | [NoTxn pos:39] executing Sync |
  139. | 12s442ms975µs847ns | 0 | [NoTxn pos:40] executing ExecStmt: SHOW TRANSACTION STATUS |
  140. | 12s442ms979µs816ns | 0 | executing: SHOW TRANSACTION STATUS in state: NoTxn |
  141. | 12s442ms987µs160ns | 0 | [NoTxn pos:41] executing Sync |
  142. | 21s727ms852µs808ns | 0 | [NoTxn pos:42] executing ExecStmt: SHOW SYNTAX 'set tracing = off;' |
  143. | 21s727ms875µs564ns | 0 | executing: SHOW SYNTAX 'set tracing = off;' in state: NoTxn |
  144. | 21s727ms955µs982ns | 0 | [NoTxn pos:43] executing Sync |
  145. | 21s728ms150µs348ns | 0 | [NoTxn pos:44] executing ExecStmt: SET TRACING = off |
  146. | 21s728ms163µs798ns | 0 | executing: SET TRACING = off in state: NoTxn |
  147. +--------------------+------+--------------------------------------------------------------------------+

Trace a transaction retry

In this example, we use session tracing to show an automatic transaction retry. Like in the previous example, we'll have to use two terminals because retries are induced by unfortunate interactions between transactions.

  • In terminal 1, turn on trace recording and then start a transaction:
  1. > SET tracing = on;
  1. > BEGIN;

Starting a transaction gets us an early timestamp, i.e., we "lock" the snapshot of the data on which the transaction is going to operate.

  • In terminal 2, perform a read:
  1. > SELECT * FROM t;

This read is performed at a timestamp higher than the timestamp of the transaction running in terminal 1. Because we're running at the SERIALIZABLE transaction isolation level, if the system allows terminal 1's transaction to commit, it will have to ensure that ordering terminal 1's transaction before terminal 2's transaction is valid; this will become relevant in a second.

  • Back in terminal 1, execute and trace a conflicting write:
  1. > INSERT INTO t VALUES (1);

At this point, the system will detect the conflict and realize that the transaction can no longer commit because allowing it to commit would mean that we have changed history with respect to terminal 2's read. As a result, it will automatically retry the transaction so it can be serialized after terminal 2's transaction. The trace will reflect this retry.

  • Turn off trace recording and request the trace:
  1. > SET tracing = off;
  1. > SELECT age, message FROM [SHOW TRACE FOR SESSION];

Tip:
Check the lines starting with #Annotation for insights into how the retry is traced.

  1. +--------------------+---------------------------------------------------------------------------------------------------------------+
  2. | age | message |
  3. +--------------------+---------------------------------------------------------------------------------------------------------------+
  4. | 0s | === SPAN START: sql txn implicit === |
  5. | 123µs317ns | AutoCommit. err: <nil>
  6. |
  7. | | txn: "sql txn implicit" id=64d34fbc key=/Min rw=false pri=0.02500536 iso=SERIALIZABLE stat=COMMITTED ... |
  8. | 1s767ms959µs448ns | === SPAN START: sql txn === |
  9. | 1s767ms989µs448ns | executing 1/1: BEGIN TRANSACTION |
  10. | # Annotation: First execution of INSERT. |
  11. | 13s536ms79µs67ns | executing 1/1: INSERT INTO t VALUES (1) |
  12. | 13s536ms134µs682ns | client.Txn did AutoCommit. err: <nil>
  13. |
  14. | | txn: "unnamed" id=329e7307 key=/Min rw=false pri=0.01354772 iso=SERIALIZABLE stat=COMMITTED epo=0 ... |
  15. | 13s536ms143µs145ns | added table 't' to table collection |
  16. | 13s536ms305µs103ns | query not supported for distSQL: mutations not supported |
  17. | 13s536ms365µs919ns | querying next range at /Table/61/1/285904591228600321/0 |
  18. | 13s536ms400µs155ns | r42: sending batch 1 CPut, 1 BeginTxn to (n1,s1):1 |
  19. | 13s536ms422µs268ns | sending request to local server |
  20. | 13s536ms434µs962ns | === SPAN START: /cockroach.roachpb.Internal/Batch === |
  21. | 13s536ms439µs916ns | 1 CPut, 1 BeginTxn |
  22. | 13s536ms442µs413ns | read has no clock uncertainty |
  23. | 13s536ms447µs42ns | executing 2 requests |
  24. | 13s536ms454µs413ns | read-write path |
  25. | 13s536ms462µs456ns | command queue |
  26. | 13s536ms497µs475ns | applied timestamp cache |
  27. | 13s536ms637µs637ns | evaluated request |
  28. | 13s536ms646µs468ns | acquired {raft,replica}mu |
  29. | 13s536ms947µs970ns | applying command |
  30. | 13s537ms34µs667ns | coordinator spawns |
  31. | 13s537ms41µs171ns | === SPAN START: [async] kv.TxnCoordSender: heartbeat loop === |
  32. | # Annotation: The conflict is about to be detected in the form of a retriable error. |
  33. | 13s537ms77µs356ns | automatically retrying transaction: sql txn (id: b4bd1f60-30d9-4465-bdb6-6b553aa42a96) because of error: |
  34. | HandledRetryableTxnError: serializable transaction timestamp pushed (detected by SQL Executor) |
  35. | # Annotation: Second execution of INSERT. |
  36. | 13s537ms83µs369ns | executing 1/1: INSERT INTO t VALUES (1) |
  37. | 13s537ms109µs516ns | client.Txn did AutoCommit. err: <nil>
  38. |
  39. | | txn: "unnamed" id=1228171b key=/Min rw=false pri=0.02917782 iso=SERIALIZABLE stat=COMMITTED epo=0 |
  40. | ts=1507321556.991937203,0 orig=1507321556.991937203,0 max=1507321557.491937203,0 wto=false rop=false |
  41. | 13s537ms111µs738ns | releasing 1 tables |
  42. | 13s537ms116µs944ns | added table 't' to table collection |
  43. | 13s537ms163µs155ns | query not supported for distSQL: writing txn |
  44. | 13s537ms192µs584ns | querying next range at /Table/61/1/285904591231418369/0 |
  45. | 13s537ms209µs601ns | r42: sending batch 1 CPut to (n1,s1):1 |
  46. | 13s537ms224µs219ns | sending request to local server |
  47. | 13s537ms233µs350ns | === SPAN START: /cockroach.roachpb.Internal/Batch === |
  48. | 13s537ms236µs572ns | 1 CPut |
  49. | 13s537ms238µs39ns | read has no clock uncertainty |
  50. | 13s537ms241µs255ns | executing 1 requests |
  51. | 13s537ms245µs473ns | read-write path |
  52. | 13s537ms248µs915ns | command queue |
  53. | 13s537ms261µs543ns | applied timestamp cache |
  54. | 13s537ms309µs401ns | evaluated request |
  55. | 13s537ms315µs302ns | acquired {raft,replica}mu |
  56. | 13s537ms580µs149ns | applying command |
  57. | 18s378ms239µs968ns | executing 1/1: COMMIT TRANSACTION |
  58. | 18s378ms291µs929ns | querying next range at /Table/61/1/285904591228600321/0 |
  59. | 18s378ms322µs473ns | r42: sending batch 1 EndTxn to (n1,s1):1 |
  60. | 18s378ms348µs650ns | sending request to local server |
  61. | 18s378ms364µs928ns | === SPAN START: /cockroach.roachpb.Internal/Batch === |
  62. | 18s378ms370µs772ns | 1 EndTxn |
  63. | 18s378ms373µs902ns | read has no clock uncertainty |
  64. | 18s378ms378µs613ns | executing 1 requests |
  65. | 18s378ms386µs573ns | read-write path |
  66. | 18s378ms394µs316ns | command queue |
  67. | 18s378ms417µs576ns | applied timestamp cache |
  68. | 18s378ms588µs396ns | evaluated request |
  69. | 18s378ms597µs715ns | acquired {raft,replica}mu |
  70. | 18s383ms388µs599ns | applying command |
  71. | 18s383ms494µs709ns | coordinator stops |
  72. | 23s169ms850µs906ns | === SPAN START: sql txn implicit === |
  73. | 23s169ms885µs921ns | executing 1/1: SET tracing = off |
  74. | 23s169ms919µs90ns | query not supported for distSQL: SET / SET CLUSTER SETTING should never distribute |
  75. +--------------------+---------------------------------------------------------------------------------------------------------------+

See also

Was this page helpful?
YesNo