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

sql: hang possible due to bad version bookkeeping #87672

Closed
ajwerner opened this issue Sep 9, 2022 · 0 comments · Fixed by #87706
Closed

sql: hang possible due to bad version bookkeeping #87672

ajwerner opened this issue Sep 9, 2022 · 0 comments · Fixed by #87706
Assignees
Labels
branch-release-22.2 Used to mark release blockers and technical advisories for 22.2 C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. GA-blocker T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@ajwerner
Copy link
Contributor

ajwerner commented Sep 9, 2022

Describe the problem

Consider the following test:

CREATE DATABASE db;
USE db;
CREATE SCHEMA sc;
BEGIN;
    CREATE SCHEMA sc2;
    SELECT * FROM crdb_internal.tables;
    DROP SCHEMA sc CASCADE;
COMMIT;

This now fails, and it was broken in #87067

Additional context
This was discovered while investigating #78478.

Jira issue: CRDB-19466

@ajwerner ajwerner added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. GA-blocker T-sql-schema-deprecated Use T-sql-foundations instead branch-release-22.2 Used to mark release blockers and technical advisories for 22.2 labels Sep 9, 2022
@blathers-crl blathers-crl bot added this to Triage in SQL Foundations Sep 9, 2022
ajwerner added a commit to ajwerner/cockroach that referenced this issue Sep 9, 2022
This is very flakey. Some of it is due to cockroachdb#87672. Some of it was due to cockroachdb#85677.
There are some issues with inserts which need to be fixed. Until this
stabilizes, it's causing problems.

Along the way, I'm marking cockroachdb#78478 as a GA blocker so we do actually fix it.

Release note: None
postamar added a commit to postamar/cockroach that referenced this issue Sep 9, 2022
Recent work on the descs.Collection (PR cockroachdb#87067) introduced a regression
in which it would return bad lease.IDVersion versions for the uncommitted
descriptors.

Fixes cockroachdb#87672.

Release justification: important bug fix
Release note: None
craig bot pushed a commit that referenced this issue Sep 9, 2022
80474: gcp: make per-chunk retry upload timeout configurable r=dt a=adityamaru

This change adds a cluster setting `cloudstorage.gs.chunking.retry_timeout`
that can be used to change the default per-chunk retry timeout
that GCS imposes when chunking of file upload is enabled. The default
value is set to 60 seconds, which is double of the default google sdk
value of 30s.

This change was motivated by sporadic occurrences of a 503 service unavailable
error during backups. On its own this change is not expected to solve the
resiliency issues of backup when the upload service is unavailable, but it
is nice to have configurable setting nonetheless.

Release note (sql change): `cloudstorage.gs.chunking.retry_timeout`
is a cluster setting that can be used to configure the per-chunk retry
timeout of files to Google Cloud Storage. The default value is 60 seconds.

86696: sql/gcjob: make index GC robust to descriptors being deleted r=ajwerner a=ajwerner

First commit is #86690

If the descriptor was deleted, the GC job should exit gracefully.

Fixes #86340

Release justification: bug fix for backport

Release note (bug fix): In some scenarios, when a DROP INDEX was
run around the same time as a DROP TABLE or DROP DATABASE covering the same
data, the `DROP INDEX` gc job could get caught retrying indefinitely. This
has been fixed.

87378: builtins: stream consistency checker output r=pavelkalinnikov a=tbg

Also makes it resilient to per-Range errors, which now no longer
tank the entire operation.

```sql
-- avoid buffering in cli
\set display_format=csv;
-- avoid rows getting buffered at server
set avoid_buffering=true;
-- compute as fast as possible
SET CLUSTER SETTING server.consistency_check.max_rate = '1tb';

SELECT * FROM crdb_internal.check_consistency(false, '', '');
```

Release justification: improvement for a debugging-related feature
Release note: None


87657: Makefile: always use `cockroach-short` for file generation r=knz a=rickystewart

This defaults to the full `cockroach` executable which requires pulling in all the UI stuff. Use `cockroach-short` to make generation require fewer dependencies.

Release note: None

87701: testccl/workload/schemachange: skip random schema test r=ajwerner a=ajwerner

This is very flakey. Some of it is due to #87672. Some of it was due to #85677. There are some issues with inserts which need to be fixed. Until this stabilizes, it's causing problems.

Along the way, I'm marking #78478 as a GA blocker so we do actually fix it.

Release note: None

Co-authored-by: Aditya Maru <adityamaru@gmail.com>
Co-authored-by: Andrew Werner <awerner32@gmail.com>
Co-authored-by: Tobias Grieger <tobias.b.grieger@gmail.com>
Co-authored-by: Ricky Stewart <ricky@cockroachlabs.com>
blathers-crl bot pushed a commit that referenced this issue Sep 9, 2022
This is very flakey. Some of it is due to #87672. Some of it was due to #85677.
There are some issues with inserts which need to be fixed. Until this
stabilizes, it's causing problems.

Along the way, I'm marking #78478 as a GA blocker so we do actually fix it.

Release note: None
craig bot pushed a commit that referenced this issue Sep 9, 2022
87525: sql: fix recording db names with hyphen for idx usage stats r=xinhaoz a=xinhaoz

Fixes #85577

This commit fixes a bug where the query constructed during
index usage stats recording failed for db names containing
a hyphen. The db name placeholder is now converted to string
from the `tree.Name`, which should properly escape hyphen
characters for the query.

Release justification: bug fix

Release note (bug fix): index usage stats are properly captured for database names with hyphens

87706: descs: fix txn commit waiting on wrong lease version r=postamar a=postamar

Recent work on the descs.Collection (PR #87067) introduced a regression
in which it would return bad lease.IDVersion versions for the uncommitted
descriptors.

Fixes #87672.

Release justification: important bug fix
Release note: None

Co-authored-by: Xin Hao Zhang <xzhang@cockroachlabs.com>
Co-authored-by: Marius Posta <marius@cockroachlabs.com>
@craig craig bot closed this as completed in a597516 Sep 9, 2022
SQL Foundations automation moved this from Triage to Closed Sep 9, 2022
blathers-crl bot pushed a commit that referenced this issue Sep 9, 2022
Recent work on the descs.Collection (PR #87067) introduced a regression
in which it would return bad lease.IDVersion versions for the uncommitted
descriptors.

In addition to fixing this, this commit corrects the lifecycle of the
`original` descriptors in the uncommitted layer, which now remain
unaffected by changes in the storage layer.

This commit tightens the constraints on what can be passed to
AddUncommittedDescriptor.

Fixes #87672.

Release justification: important bug fix
Release note: None
@exalate-issue-sync exalate-issue-sync bot added T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) and removed T-sql-schema-deprecated Use T-sql-foundations instead labels May 10, 2023
@blathers-crl blathers-crl bot added this to Triage in SQL Foundations May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-release-22.2 Used to mark release blockers and technical advisories for 22.2 C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. GA-blocker T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
SQL Foundations
  
Done [after migration]
Development

Successfully merging a pull request may close this issue.

2 participants