-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
roachtest: backup: use AOST time slightly in the past #35359
Conversation
Avoids problems where it's sometimes in the future according to the AOST logic. Fixes #34817 Release note: None
I've seen some other roachtests that are failing with the same error. Do you know which change caused this problem. |
I think it was #34547 which changed what the max time is. |
I'm seeing a similar failure in #34922 (comment) I suspect it's being cuased by using Now() in https://github.com/cockroachdb/cockroach/blob/master/pkg/sql/conn_executor_exec.go#L597 @ajwerner any thoughts on this? |
Yes it does seem that the recent change is causing the problems. The code in #34547 makes AOST evaluation relevant to the stmt time and enforces that it proceeds that time by at least 1us. One easy way to enforce that you get a near real time value that is safe is to use a relative AOST specifier rather than an exact one. I'd recommend using |
@ajwerner I can either use the statement timestamp or a timestamp less by at least |
Correct, if you pass a timestamp which is parsed by ParseDTimestamp that is not after the statement timestamp then it should be fine. It is interesting that you were able to create a time before issuing the query that created a value after the statement timestamp. It may have something to do with the resolution of the timestamp string. If you passed the timestamp in Decimal HLC format it should have sufficient resolution. |
@ajwerner hmmm perhaps it's https://github.com/cockroachdb/cockroach/blob/master/pkg/sql/conn_executor_exec.go#L563 then that uses the txn timestamp . I believe we do this to prevent clock uncertainty from pushing the txn. Perhaps I need to rethink using AOST for this use case. But could that be the problem? |
That shouldn't be the problem as the txn's timestamp should be before or equal to the statement timestamp. Furthermore, now that I've looked at the serialization, it seems to use the decimal HLC form. I'm honestly confused as to the source of the problem. I'll keep digging. |
#27688 (comment) is another roachtest failure. |
cockroach/pkg/sql/sem/tree/as_of.go Line 128 in 79f4d36
|
The |
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.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @danhhz and @dt)
bors r+ |
35091: sql: rearchitecture ALTER TABLE RENAME, add support for renaming constraints r=knz a=knz Fixes #32555. For TypeORM compat, see discussion on #22298. Release note (sql change): This patch changes RENAME COLUMN to become a "table command", which can be used alongside other table commands in a single ALTER TABLE statement. This makes it possible to e.g. atomically add a computed column based on an existing column, and rename the columns so that the computed column "replaces" the original column. Release note (sql change): CockroachDB now supports ALTER TABLE RENAME CONSTRAINT for compatibility with PostgreSQL. This feature is limited to *named* constraints, where the name of the constraints is preserved in the table metadata. This currently includes CHECK, UNIQUE and FOREIGN KEY constraints, and does not include other constraints (DEFAULT, NULL etc) otherwise supported by PostgreSQL. For UNIQUE constraint, only supporting indexes that are not depended on by views can be renamed. 35121: sql: add support for pg_catalog.{current_setting,set_config} r=knz a=knz Fixes #35108. Needed for Flowable compatibility. Release note (sql change): The SQL built-in functions `pg_catalog.current_setting()` and `pg_catalog.set_config()` are now supported for compatibility with PostgreSQL. Note that only session-scoped configuration changes remain supported (`set_config(_, _, false)`). 35359: roachtest: backup: use AOST time slightly in the past r=mjibson a=mjibson Avoids problems where it's sometimes in the future according to the AOST logic. Fixes #34817 Release note: None 35371: sql: ensure column constraints are validated after SET for UPSERT r=knz a=knz Fixes #35040. Release note (bug fix): CockroachDB now properly applies column width and nullability constraints on the result of conflict resolution in UPSERT and INSERT ON CONFLICT. Co-authored-by: Raphael 'kena' Poss <knz@cockroachlabs.com> Co-authored-by: Matt Jibson <matt.jibson@gmail.com>
Build succeeded |
Avoids problems where it's sometimes in the future according to the
AOST logic.
Fixes #34817
Release note: None