Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-22.1: execbuilder: fix a rare flake #82648

Merged
merged 1 commit into from
Jun 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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