-
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
sqlbase: link to issue #42508 in sequence-related errors #42509
Conversation
49caab0
to
f119d16
Compare
32f82ad
to
eccafb6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r1.
Reviewable status: complete! 0 of 0 LGTMs obtained
cool thanks! bors r+ |
Build failed |
transient agent failure - retrying bors r+ |
Build failed |
Ok I'm not going to blame the CI agents further and instead investigate this. Later this week. |
Ok I went to CI and I see the servers failing to shut down because they are stuck trying to send stuff to our telemetry servers. Example hanging goroutine:
|
CI will go better after #42537 |
This patch fixes two things. 1) When the backfiller encounters a sequence operation it fails with a hard error. This and consequences is described further in issue cockroachdb#42508. To inform the user better, this patch links the error message to that issue. Additionally, this also ensures that telemetry usage is reported for the unimplemented feature. For example: ``` [email protected]:39861/movr> alter table t add column y int default nextval('s'); pq: nextval(): unimplemented: cannot backfill such sequence operation HINT: You have attempted to use a feature that is not yet implemented. See: cockroachdb#42508 ``` and ``` > begin; alter table t add column y int default nextval('s'); commit; pq: transaction committed but schema change aborted with error: (0A000): nextval(): unimplemented: cannot backfill such sequence operation HINT: You have attempted to use a feature that is not yet implemented. See: cockroachdb#42508 -- Some of the non-DDL statements may have committed successfully, but some of the DDL statement(s) failed. Manual inspection may be required to determine the actual state of the database. -- See: cockroachdb#42061 ``` 2) The other thing. Prior to this patch, an error "under" a backfill would be flattened into error code 42P15 (invalid schema), even if the schema was valid and the error was really about something encountered during the backfill. This patch fixes it. For example, ``` ALTER TABLE shopping ADD COLUMN c int AS (quantity::int // 0) STORED ``` Would previously error out with code 42P15, whereas the true error is 22012 (division by zero) which is reported now. Release note (sql change): CockroachDB will now properly refer to issue cockroachdb#42508 in the error message hint when a client attempts to add a sequence-based column to an existing table, which is an unimplemented feature. Release note (sql change): CockroachDB will now report an more accurate error message, hint and error code if/when an error is encountered while adding a new column.
bors r+ |
42509: sqlbase: link to issue #42508 in sequence-related errors r=knz a=knz (I intend to back-port this to 19.2 and perhaps 19.1.) Informs #42508. Informs #42510. This patch fixes two things. 1) When the backfiller encounters a sequence operation it fails with a hard error. This and consequences is described further in issue #42508. To inform the user better, this patch links the error message to that issue. Additionally, this also ensures that telemetry usage is reported for the unimplemented feature. For example: ``` [email protected]:39861/movr> alter table t add column y int default nextval('s'); pq: nextval(): unimplemented: cannot backfill such sequence operation HINT: You have attempted to use a feature that is not yet implemented. See: #42508 ``` and ``` > begin; alter table t add column y int default nextval('s'); commit; pq: transaction committed but schema change aborted with error: (0A000): nextval(): unimplemented: cannot backfill such sequence operation HINT: You have attempted to use a feature that is not yet implemented. See: #42508 -- Some of the non-DDL statements may have committed successfully, but some of the DDL statement(s) failed. Manual inspection may be required to determine the actual state of the database. -- See: #42061 ``` 2) The other thing. Prior to this patch, an error "under" a backfill would be flattened into error code 42P15 (invalid schema), even if the schema was valid and the error was really about something encountered during the backfill. This patch fixes it. For example, ``` ALTER TABLE shopping ADD COLUMN c int AS (quantity::int // 0) STORED ``` Would previously error out with code 42P15, whereas the true error is 22012 (division by zero) which is reported now. Release note (sql change): CockroachDB will now properly refer to issue #42508 in the error message hint when a client attempts to add a sequence-based column to an existing table, which is an unimplemented feature. Release note (sql change): CockroachDB will now report an more accurate error message, hint and error code if/when an error is encountered while adding a new column. Co-authored-by: Raphael 'kena' Poss <[email protected]>
Build succeeded |
(I intend to back-port this to 19.2 and perhaps 19.1.)
Informs #42508.
Informs #42510.
This patch fixes two things.
hard error. This and consequences is described further in issue sql: cannot add a new sequence-populated column (or pg-compatible SERIAL) to an existing table, + bug #42508.
To inform the user better, this patch links the error message to that issue.
Additionally, this also ensures that telemetry usage is reported
for the unimplemented feature.
For example:
and
would be flattened into error code 42P15 (invalid schema), even if
the schema was valid and the error was really about something
encountered during the backfill. This patch fixes it. For example,
Would previously error out with code 42P15, whereas the true error is
22012 (division by zero) which is reported now.
Release note (sql change): CockroachDB will now properly refer to
issue #42508 in the error message hint when a client attempts
to add a sequence-based column to an existing table, which
is an unimplemented feature.
Release note (sql change): CockroachDB will now report an more
accurate error message, hint and error code if/when an error is
encountered while adding a new column.