-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Sentry: table_desc_builder.go:1320: referenced descriptor ID 201: table × (201): identity column × (1) on table × must own a sequence (1) Wraps: (2) Wraps: (3) Wraps: (4) Wraps: (5) attached stack ... #138972
Comments
CC'ing via the CODEOWNERS-based sentry heuristic:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
We identified which CC cluster this is coming from. See https://cockroachlabs.slack.com/archives/CJX8V9SJ2/p1736800954157709 The GENERATED column looks weird. It shouldn't have
I'll try to investigate how they landed up in this state. |
I've tracked this down further. The following is allowed in 24.2 and earlier, but it shouldn't be:
In 24.3 we block this, and it fails with:
The reason this shouldn't be allowed is because using SERIAL with There's a similar Sentry report for a different cluster here: #138925 |
Discussed more here: https://cockroachlabs.slack.com/archives/C04N0AS14CT/p1736890230158459 I'm repairing this with:
|
Unfortunately the repair didn't work:
It's because the descriptor can't be read at all, because of the assertion added to |
139084: sql: relax validation for IDENTITY columns r=rafiss a=rafiss The validations added in 4f99f9c were too strict. This patch makes it so we can continue having IDENTITY columns that are not backed by a sequence. This can happen if a SERIAL column is created with IDENTITY, and serial_normalization=rowid. informs #138925 informs #138972 Release note (bug fix): Fixed a bug where columns created with GENERATED ... BY IDENTITY with the SERIAL type could incorrectly fail internal validations. Co-authored-by: Rafi Shamim <[email protected]>
After more discussion, we've decided to continue with the 24.2 behavior of allowing this kind of column. Removing the IDENTITY property would be too destructive a change, since one property of those columns is that they cannot be written to. Instead, we will make the validations less strict, so that an IDENTITY column can be backed by |
This issue was auto filed by Sentry. It represents a crash or reported error on a live cluster with telemetry enabled.
Sentry Link: https://cockroach-labs.sentry.io/issues/6217117453/?referrer=webhooks_plugin
Panic Message:
Stacktrace (expand for inline code snippets):
src/runtime/asm_amd64.s#L1694-L1696
pkg/util/stop/stopper.go#L497-L499
pkg/sql/virtual_table.go#L138-L140
pkg/sql/virtual_table.go#L137-L139
pkg/sql/virtual_schema.go#L656-L658
pkg/sql/pg_catalog.go#L1178-L1180
pkg/sql/information_schema.go#L2648-L2650
pkg/sql/catalog/descs/collection.go#L1069-L1071
pkg/sql/catalog/descs/collection.go#L885-L887
pkg/sql/catalog/descs/collection.go#L1042-L1044
pkg/sql/catalog/descs/descriptor.go#L201-L203
pkg/sql/catalog/internal/catkv/catalog_reader_cached.go#L356-L358
pkg/sql/catalog/internal/catkv/catalog_reader.go#L355-L357
pkg/sql/catalog/internal/catkv/catalog_query.go#L69-L71
pkg/sql/catalog/internal/catkv/catalog_query.go#L110-L112
pkg/sql/catalog/internal/catkv/catalog_query.go#L167-L169
src/runtime/asm_amd64.s#L1694-L1696
pkg/util/stop/stopper.go#L497-L499
pkg/sql/virtual_table.go#L138-L140
pkg/sql/virtual_table.go#L137-L139
pkg/sql/virtual_schema.go#L656-L658
pkg/sql/pg_catalog.go#L1178-L1180
pkg/sql/information_schema.go#L2648-L2650
pkg/sql/catalog/descs/collection.go#L1069-L1071
pkg/sql/catalog/descs/collection.go#L885-L887
pkg/sql/catalog/descs/collection.go#L1042-L1044
pkg/sql/catalog/descs/descriptor.go#L201-L203
pkg/sql/catalog/internal/catkv/catalog_reader_cached.go#L356-L358
pkg/sql/catalog/internal/catkv/catalog_reader.go#L355-L357
pkg/sql/catalog/internal/catkv/catalog_query.go#L69-L71
pkg/sql/catalog/internal/catkv/catalog_query.go#L108-L110
pkg/sql/catalog/internal/catkv/catalog_query.go#L175-L177
pkg/sql/catalog/descbuilder/desc_builder.go#L45-L47
pkg/sql/catalog/descbuilder/desc_builder.go#L67-L69
pkg/sql/catalog/tabledesc/table_desc_builder.go#L171-L173
pkg/sql/catalog/tabledesc/table_desc_builder.go#L158-L160
src/runtime/asm_amd64.s#L1694-L1696
pkg/util/stop/stopper.go#L497-L499
pkg/sql/virtual_table.go#L138-L140
pkg/sql/virtual_table.go#L137-L139
pkg/sql/virtual_schema.go#L656-L658
pkg/sql/pg_catalog.go#L1178-L1180
pkg/sql/information_schema.go#L2648-L2650
pkg/sql/catalog/descs/collection.go#L1069-L1071
pkg/sql/catalog/descs/collection.go#L885-L887
pkg/sql/catalog/descs/collection.go#L1042-L1044
pkg/sql/catalog/descs/descriptor.go#L201-L203
pkg/sql/catalog/internal/catkv/catalog_reader_cached.go#L356-L358
pkg/sql/catalog/internal/catkv/catalog_reader.go#L355-L357
pkg/sql/catalog/internal/catkv/catalog_query.go#L69-L71
pkg/sql/catalog/internal/catkv/catalog_query.go#L108-L110
pkg/sql/catalog/internal/catkv/catalog_query.go#L175-L177
pkg/sql/catalog/descbuilder/desc_builder.go#L45-L47
pkg/sql/catalog/descbuilder/desc_builder.go#L67-L69
pkg/sql/catalog/tabledesc/table_desc_builder.go#L169-L171
pkg/sql/catalog/tabledesc/table_desc_builder.go#L516-L518
pkg/sql/catalog/tabledesc/table_desc_builder.go#L1319-L1321
Tags
Jira issue: CRDB-46444
The text was updated successfully, but these errors were encountered: