sql/copy: deflake TestLargeCopy by enabling retries in non-atomic mode#164320
Closed
mw5h wants to merge 1 commit intocockroachdb:masterfrom
Closed
sql/copy: deflake TestLargeCopy by enabling retries in non-atomic mode#164320mw5h wants to merge 1 commit intocockroachdb:masterfrom
mw5h wants to merge 1 commit intocockroachdb:masterfrom
Conversation
TestLargeCopy randomly chooses between atomic and non-atomic COPY mode. In non-atomic mode, the test disables `copy_from_atomic_enabled` but does not enable `copy_from_retries_enabled`. This means retryable errors (TransactionRetryWithProtoRefreshError / SQLSTATE 40001) are not handled by the internal COPY retry mechanism, and the test's `ignoreErr` function only ignores SerializationFailure in atomic mode. Enable `copy_from_retries_enabled` alongside disabling atomic mode so that the per-batch retry mechanism handles transient conflicts automatically. Fixes: cockroachdb#164185 Release note: None Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Merging to
|
Member
yuzefovich
reviewed
Feb 25, 2026
Member
yuzefovich
left a comment
There was a problem hiding this comment.
@yuzefovich reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on mw5h).
-- commits line 6 at r1:
Looks like we have copy_from_retries_enabled and don't mutate it later, so this commit seems like a no-op to me?
yuzefovich
requested changes
Feb 25, 2026
Member
yuzefovich
left a comment
There was a problem hiding this comment.
@yuzefovich made 1 comment.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on mw5h).
Previously, yuzefovich (Yahor Yuzefovich) wrote…
Looks like we have
copy_from_retries_enabledand don't mutate it later, so this commit seems like a no-op to me?
Sorry, meant to say "Looks like we have copy_from_retries_enabled enabled by default ..."
Contributor
Author
|
Whups. |
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.
TestLargeCopyrandomly chooses between atomic and non-atomic COPY mode.In non-atomic mode, the test disables
copy_from_atomic_enabledbut doesnot enable
copy_from_retries_enabled. This means retryable errors(
TransactionRetryWithProtoRefreshError/ SQLSTATE 40001) are not handledby the internal COPY retry mechanism, and the test's
ignoreErrfunctiononly ignores
SerializationFailurein atomic mode.Enable
copy_from_retries_enabledalongside disabling atomic mode so thatthe per-batch retry mechanism handles transient conflicts automatically.
Fixes: #164185
Epic: CRDB-60677
Release note: None