Skip to content

Commit

Permalink
Merge pull request #82648 from cockroachdb/blathers/backport-release-…
Browse files Browse the repository at this point in the history
…22.1-82642

release-22.1: execbuilder: fix a rare flake
  • Loading branch information
yuzefovich authored Jun 9, 2022
2 parents e8e18d4 + 7821cd7 commit a03914a
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions pkg/sql/opt/exec/execbuilder/testdata/vectorize_local
Original file line number Diff line number Diff line change
Expand Up @@ -227,19 +227,22 @@ SET tracing = on; SELECT * FROM tpar WHERE a = 0 OR a = 10
statement ok
SET tracing = off

# The span "sending partial batch" means that the scan was parallelized. We're
# seeing duplicate "querying next range" entries because we first use the range
# cache to try to partition the spans in order to have parallel TableReaders (we
# end up with a single partition though), and then we have a single TableReader
# performing the scan of two spans in parallel.
query T
SELECT message FROM [SHOW TRACE FOR SESSION]
# The span "sending partial batch" means that the scan was parallelized.
#
# Most of the time we're seeing duplicate "querying next range" entries because
# we first use the range cache to try to partition the spans in order to have
# parallel TableReaders (we end up with a single partition though), and then we
# have a single TableReader performing the scan of two spans in parallel.
# However, occasionally the duplicate "querying next range at /Table/109/1/10/0"
# message is either dropped entirely or replaced with another
# "querying next range at /Table/109/1/0/0". It's not clear why that happens, so
# we deduplicate the messages to make the test non-flaky.
query T rowsort
SELECT DISTINCT message FROM [SHOW TRACE FOR SESSION]
WHERE message LIKE 'querying next range at %' OR
message = '=== SPAN START: kv.DistSender: sending partial batch ==='
----
querying next range at /Table/109/1/0/0
querying next range at /Table/109/1/10/0
querying next range at /Table/109/1/0/0
=== SPAN START: kv.DistSender: sending partial batch ===
querying next range at /Table/109/1/10/0

Expand Down

0 comments on commit a03914a

Please sign in to comment.