-
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
sql: stop observing the CommitTimestamp in TRUNCATE #42650
sql: stop observing the CommitTimestamp in TRUNCATE #42650
Conversation
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.
LGTM
Nit: I wouldn't talk about observing commit timestamps in the release note. And also I don't think phrasing like "this change" is appropriate in release notes - there's no "this" in that context.
Lucy, can we get an explanation of the Time field in the ReplacementOf
struct please? It has no comment... Let's make it wall time instead of an hlc.Timestamp if it doesn't need to be HLC.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @andreimatei and @lucy-zhang)
1da85e9
to
fe800e5
Compare
I added some commentary and updated the release note. |
In cockroachdb#40581 we stopped observing the commit timestamp to write it into table descriptors. In this change I overlooked (rather forgot) about this additional place in the code where we observed the commit timestamp. As far as I can tell we don't read this field anywhere ever. Furthermore we know that the the table descriptor in question to which we are referring must be alive and equal to the provided value at the timestamp at which it was read due to serializability. In short, this minor change continues to populate the field with a sensible value and will permit TRUNCATE to be pushed. Fixes cockroachdb#41566. Release note (bug fix): Long running transactions which attempt to TRUNCATE can now be pushed and will commit in cases where they previously could fail or retry forever.
fe800e5
to
3003a79
Compare
@lucy-zhang friendly ping |
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 2 of 3 files at r1.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @lucy-zhang)
TFTR! bors r+ |
42650: sql: stop observing the CommitTimestamp in TRUNCATE r=ajwerner a=ajwerner In #40581 we stopped observing the commit timestamp to write it into table descriptors. In this change I overlooked (rather forgot) about this additional place in the code where we observed the commit timestamp. As far as I can tell we don't read this field anywhere ever. Furthermore we know that the the table descriptor in question to which we are referring must be alive and equal to the provided value at the timestamp at which it was read due to serializability. In short, this minor change continues to populate the field with a sensible value and will permit TRUNCATE to be pushed. Fixes #41566. Release note (bug fix): Long running transactions which attempt to TRUNCATE can now be pushed and will commit in cases where they previously could fail or retry forever. 42746: roachtest/cdc: fix cdc/bank and cdc/schemareg r=nvanbenschoten a=nvanbenschoten Fixes #41177. Fixes #42690. These were both broken by #41793 because prior versions of crdb didn't support the `WITH diff` option. Co-authored-by: Andrew Werner <[email protected]> Co-authored-by: Nathan VanBenschoten <[email protected]>
Build succeeded |
In cockroachdb#42650 I had intended to remove all places where the commit timestamp was observed in TRUNCATE. I missed this case. Modification times for the first write to table descriptors as of 19.2 should be the zero value (or the commit timestamp, so this isn't wrong). This observance of the commit timestamp prevents transactions which TRUNCATE tables from being pushed. Combined with cockroachdb#44090 we'll have removed all non-user observation of commit timestamps. Release note (bug fix): Long running transactions which attempt to TRUNCATE can now be pushed and will commit in cases where they previously could fail or retry forever.
44091: sql: stop observing the commit timestamp in TRUNCATE r=nvanbenschoten a=ajwerner In #42650 I had intended to remove all places where the commit timestamp was observed in TRUNCATE. I missed this case. Modification times for the first write to table descriptors as of 19.2 should be the zero value (or the commit timestamp, so this isn't wrong). This observance of the commit timestamp prevents transactions which TRUNCATE tables from being pushed. Combined with #44090 we'll have removed all non-user observation of commit timestamps. Release note (bug fix): Long running transactions which attempt to TRUNCATE can now be pushed and will commit in cases where they previously could fail or retry forever. Co-authored-by: Andrew Werner <[email protected]>
In #40581 we stopped observing the commit timestamp to write it into table
descriptors. In this change I overlooked (rather forgot) about this additional
place in the code where we observed the commit timestamp. As far as I can tell
we don't read this field anywhere ever. Furthermore we know that the the table
descriptor in question to which we are referring must be alive and equal to
the provided value at the timestamp at which it was read due to serializability.
In short, this minor change continues to populate the field with a sensible
value and will permit TRUNCATE to be pushed.
Fixes #41566.
Release note (bug fix): Long running transactions which attempt to TRUNCATE
can now be pushed and will commit in cases where they previously could fail
or retry forever.