Repository navigation
Conversation
The Share Input Scan part of bfv_cte checks the SISC debug LOG messages
from seg2 in the order they appear in the client output. These
messages are written by different QE processes, the SISC writer and
one or two readers, and reach the client through separate QE
connections, so the order in which the QD relays them is not
deterministic. The test then fails now and then, e.g. with the ORCA
plan, where one reader's "wrote notify_done" can arrive before the
other reader's "initialized xslice state":
-LOG: SISC (shareid=0, slice={2|4}): initialized xslice state
LOG: SISC READER (shareid=0, slice={2|4}): wrote notify_done
+LOG: SISC (shareid=0, slice={2|4}): initialized xslice state
LOG: SISC READER (shareid=0, slice={2|4}): wrote notify_done
Print the LOG lines sorted, followed by the rest of the output. The
test still checks which slice initializes the shared state and that
every reader and the writer log the expected steps; the order between
processes was never guaranteed anyway.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change stabilizing bfv_cte log ordering.
No open issues 🎉
What changed in this PR
This PR stabilizes the bfv_cte regression test by removing its dependence on the arrival order of Share Input Scan logs from separate query-executor processes.
Changes:
- Sort relevant seg2 LOG messages using
LC_ALL=C, then print non-LOG output. - Update both planner-specific expected outputs to match the new ordering while preserving checks for expected log messages.
| File | Description |
|---|---|
src/test/regress/sql/bfv_cte.sql |
Sorts filtered logs and documents why arrival order is nondeterministic. |
src/test/regress/expected/bfv_cte.out |
Updates the standard planner’s expected output ordering. |
src/test/regress/expected/bfv_cte_optimizer.out |
Updates the ORCA planner’s expected output ordering. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Share Input Scan part of bfv_cte checks the SISC debug LOG messages from seg2 in the order they appear in the client output. These messages are written by different QE processes, the SISC writer and one or two readers, and reach the client through separate QE connections, so the order in which the QD relays them is not deterministic. The test then fails now and then, e.g. with the ORCA plan, where one reader's "wrote notify_done" can arrive before the other reader's "initialized xslice state":
-LOG: SISC (shareid=0, slice={2|4}): initialized xslice state
LOG: SISC READER (shareid=0, slice={2|4}): wrote notify_done
+LOG: SISC (shareid=0, slice={2|4}): initialized xslice state
LOG: SISC READER (shareid=0, slice={2|4}): wrote notify_done
Print the LOG lines sorted, followed by the rest of the output. The test still checks which slice initializes the shared state and that every reader and the writer log the expected steps; the order between processes was never guaranteed anyway.