-
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: remove Txn() from JobExecContext #92320
Conversation
if execCtx.Txn() != nil { | ||
return execCtx.Txn().ReadTimestamp() | ||
} |
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.
@cockroachdb/cdc-prs This bit is worth looking at.
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.
Thanks for the heads up. I think this is fine since we cache the result anyway, and we just need consistent results while validating, not ones specific to the transaction.
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.
Cool. And, I believe that in the context this was being called, that context would have been nil all of the time anyway. So hopefully this is a noop.
This appears to always be nil. As a method it doesn't really even make sense, since it is unclear would such a transaction commit. Release note: None
This removes Txn() from JobExecContext. This method would always return a nil context, making it a bit error prone to actually use in jobs. Release note: None
b2c206b
to
d640759
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.
C2C and backup changes LGTM, but would be nice to get a cdc stamp too.
bors r=adityamaru |
Build succeeded: |
This removes Txn() from JobExecContext. This method would always
return a nil txn, making it a bit error prone to actually use in
jobs.
Epic: None
Release note: None