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

Extend the retry logictest directive to work with "statement error" commands #95668

Closed
msirek opened this issue Jan 22, 2023 · 0 comments · Fixed by #96160
Closed

Extend the retry logictest directive to work with "statement error" commands #95668

msirek opened this issue Jan 22, 2023 · 0 comments · Fixed by #96160
Assignees
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-queries SQL Queries Team

Comments

@msirek
Copy link
Contributor

msirek commented Jan 22, 2023

Currently the retry logictest directive only works with tests of successful queries.
This issue is opened to extend support for this directive to the statement error command
for queries which are expected to error out.
Note that retries are sometimes needed to undo caching of empty zone configs, as was
found in #87391, so are an essential tool for multiregion logic tests.
Perhaps there is an outstanding issue with the proper propagation of zone configs which
could also be investigated as part of this issue which, if fixed, might eliminate the need for retries.

This issue is opened is response to review comments in #95484.

Jira issue: CRDB-23666

@msirek msirek added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-queries SQL Queries Team labels Jan 22, 2023
msirek pushed a commit to msirek/cockroach that referenced this issue Jan 30, 2023
This adds a retry command to logic tests which may be issued on a
separate line preceding either a "statement" or "query" command.
It causes the statement to be retried with exponential backoff up
to some maximum duration, e.g.
```
retry
statement error column "non_exist" does not exist
ALTER TABLE created_as_global SET LOCALITY REGIONAL BY ROW AS "non_exist"
```
This has the same effect as the retry option of the query command, but
now also supports "statement ok", "statement error" and "query error"
commands.

Retry of a query command may be specified by the standalone retry
command, the retry option of the query command, or both.

Fixes: cockroachdb#95668

Epic: CRDB-20535

Release note: None
msirek pushed a commit to msirek/cockroach that referenced this issue Jan 30, 2023
This adds a retry command to logic tests which may be issued on a
separate line preceding either a "statement" or "query" command.
It causes the statement to be retried with exponential backoff up
to some maximum duration, e.g.
```
retry
statement error column "non_exist" does not exist
ALTER TABLE created_as_global SET LOCALITY REGIONAL BY ROW AS "non_exist"
```
This has the same effect as the retry option of the query command, but
now also supports "statement ok", "statement error" and "query error"
commands.

Retry of a query command may be specified by the standalone retry
command, the retry option of the query command, or both.

Fixes: cockroachdb#95668

Epic: CRDB-20535

Release note: None
@msirek msirek self-assigned this Jan 31, 2023
craig bot pushed a commit that referenced this issue Feb 2, 2023
96160: logictest: retry support for "statement" and "query" commands r=msirek a=msirek

logictest: retry support for "statement" and "query" commands
----
This commit adds a retry command to logic tests which may be issued on a
separate line preceding either a "statement" or "query" command.     
It causes the statement to be retried with exponential backoff up 
to some maximum duration, e.g.
```
retry
statement error column "non_exist" does not exist
ALTER TABLE created_as_global SET LOCALITY REGIONAL BY ROW AS "non_exist"
```
This has the same effect as the retry option of the query command, but
now also supports "statement ok", "statement error" and "query error"
commands.

Retry of a query command may be specified by the standalone retry
command, the retry option of the query command, or both.

Fixes: #95668

Epic: CRDB-20535

Release note: None

logictest: vectorized off config for multi_region_remote_access_error test                            
----
This enables the `multiregion-9node-3region-3azs-vec-off` config for the
`multi_region_remote_access_error` test and adds retry commands prior to
statements.

Epic: CRDB-18645

Release note: None 

Co-authored-by: Mark Sirek <[email protected]>
@craig craig bot closed this as completed in a433443 Feb 2, 2023
msirek pushed a commit to msirek/cockroach that referenced this issue Jun 29, 2023
This adds a retry command to logic tests which may be issued on a
separate line preceding either a "statement" or "query" command.
It causes the statement to be retried with exponential backoff up
to some maximum duration, e.g.
```
retry
statement error column "non_exist" does not exist
ALTER TABLE created_as_global SET LOCALITY REGIONAL BY ROW AS "non_exist"
```
This has the same effect as the retry option of the query command, but
now also supports "statement ok", "statement error" and "query error"
commands.

Retry of a query command may be specified by the standalone retry
command, the retry option of the query command, or both.

Fixes: cockroachdb#95668

Epic: CRDB-20535

Release note: None
@mgartner mgartner moved this to Done in SQL Queries Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-queries SQL Queries Team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant