Skip to content

execbuilder: unexpectedly changed KV usage due to tracing commit #60672

@tbg

Description

@tbg

The test case here:

query TT
SELECT operation, message FROM [SHOW KV TRACE FOR SESSION]
WHERE message LIKE '%r$rangeid: sending batch%'
AND message NOT LIKE '%PushTxn%'
AND message NOT LIKE '%QueryTxn%'
----
dist sender send r36: sending batch 2 CPut, 1 EndTxn to (n1,s1):1

changed as a result of a commit that did not touch anything but tracing, namely this one (SHA is still unstable at time of writing) from #59992:

tracing: propagate non-recording spans across rpc boundaries

I adapted the test case to match the new expectation:

-- FAIL: TestExecBuild (0.17s)
    test_log_scope.go:73: test logs captured to: /tmp/logTestExecBuild382866614
    test_log_scope.go:74: use -show-logs to present logs inline
    --- FAIL: TestExecBuild/local (0.00s)
        --- FAIL: TestExecBuild/local/autocommit_nonmetamorphic (0.16s)
            logic.go:2324: let $rangeid = 36
            logic.go:2283: 
                 
                testdata/autocommit_nonmetamorphic:107: SELECT operation, message FROM [SHOW KV TRACE FOR SESSION]
                WHERE message     LIKE '%r36: sending batch%'
                  AND message NOT LIKE '%PushTxn%'
                  AND message NOT LIKE '%QueryTxn%'
                expected:
                    dist sender send  r36: sending batch 2 CPut, 1 EndTxn to (n1,s1):1
                    
                but found (query options: "") :
                    dist sender send  r36: sending batch 2 CPut to (n1,s1):1
                    dist sender send  r36: sending batch 2 CPut, 1 EndTxn to (n1,s1):1
            logic.go:3109: 
                testdata/autocommit_nonmetamorphic:115: error while processing
            logic.go:3109: testdata/autocommit_nonmetamorphic:115: too many errors encountered, skipping the rest of the input
    logic.go:3334: -- test log scope end --

based on the assumption that the extra request was always there, but did not get traced.

Since this is the 1PC optimization, it's worth double checking what's going on here.

Metadata

Metadata

Assignees

Labels

A-sql-executionRelating to SQL execution.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions