roachtest: do not fail costfuzz test on perturbed error #81416
Merged
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 costfuzz test repeatedly executes a randomly generated query twice,
once with a normal plan and once with a perturbed-costs plan. We were
considering a successful first execution followed by an errored second
execution a test failure. But there are certain queries that
legitimately return errors nondeterministically depending on plan. For
example:
The first plan will successfully return 0 rows because the hash join can
short-circuit without evaluating 1 / a. The second plan will return a
divide-by-zero error because 1 / a is evaluated while building the hash
table. This is not a bug.
Internal errors are a little more interesting than normal SQL-level
errors, so we still consider this a test failure on internal errors.
Fixes: #81032
Release note: None