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
69966: kvcoord: avoid concurrent rollbacks when making parallel commits explicit r=nvanbenschoten,andreimatei a=erikgrinaker
`TxnCoordSender` allows `EndTxn(commit=false)` rollback requests even if
the transaction state is finalized, since clients can send multiple
rollbacks (e.g. due to context cancellation). However, it allowed this
even when the transaction was committed. This could pass the request
through while the `txnCommitter` was asynchronously making an implicit
commit explicit, which would violate the `txnLockGatekeeper` requirement
that transaction requests are synchronous (non-concurrent) which would
return an unexpected error for the rollback.
This patch rejects additional `EndTxn(commit=false)` requests if the
finalized transaction is known to be committed, to prevent this race
condition. If rejected, the returned error is of the same type that
would be returned by `EndTxn` evaluation, although with a different
message string.
Note that even though the returned error should really have
`REASON_TXN_COMMITTED` in this case, which is also what `txn.Rollback()`
expects in order to omit logging, the current `EndTxn` code incorrectly
returns `REASON_TXN_UNKNOWN` in this case. This behavior is retained to
minimize the change, but should be corrected separately.
Resolves#68643.
Informs #69965.
Release justification: fixes for high-priority or high-severity bugs in existing functionality
Release note: None
70210: rowexec: fix a ctx NPE in couple of processors in edge cases r=yuzefovich a=yuzefovich
We recently extended the statistics that are collected during EXPLAIN
ANALYZE runs to include the "scan stats". However, in the joinReader and
the tableReader those are collected when closing the processor based on
the context argument, and in some edge cases (like when `Start` was
never called) might be nil leading to a NPE. This commit fixes the
problem by unifying all processors to collect all execution stats in
`execStatsForTrace` (which isn't called in the edge case mentioned
above).
Fixes: #70075.
Fixes: #70107.
Release note: None (no release with this bug)
Co-authored-by: Erik Grinaker <[email protected]>
Co-authored-by: Yahor Yuzefovich <[email protected]>
0 commit comments