You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kvcoord: always check for buffered writes when checking for locks
When reading through code for an unrelated reason we noted that there
was a call checking for acquired locks but not buffered writes. This is
concerning since the reasoning for why we need to check for acquired
locks almost always implies we should also check for buffered writes.
In the particular case of RollbackToSavepoint, I believe the omission
has no impact. Namely:
- Previous writes have been cleared from the buffer and thus aren't in
danger of failing to be rolled back.
- Subsequent writes will bump the sequence number and thus those
writes are not in danger of being erroneously rolled back.
- Subsequent reads cannot read the data that should have been rolled
back because it will have been cleared from the buffer.
Further, for real-world SQL transactions, we never have a buffered write
without having at least 1 lock.
However, for the avoidance fo doubt, we now check both and add a new
method to avoid missing checks in the future.
Fixes#155975
Release note: None
0 commit comments