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
if (response.deadlock_reason(i).code() != AppStatusPB::OK) {
// response contains a deadlock specific error.
status_info.expected_deadlock_status = StatusFromPB(response.deadlock_reason(i));
}
The code does not check the size of response.deadlock_reason and tries to access it by an index unconditionally. However the structure is empty for this case-
response.deadlock_reason can be empty when the response is received from a tablet server, which is not yet updated and that tablet server knows nothing about deadlock_reason.
…sponsePB proto message due to recent regression
Summary:
Commit d6d0cf6 introduced a new field `deadlock_reason` in the proto message `GetTransactionStatusResponsePB`. The commit didn't handle rolling upgrade scenarios gracefully. It expects that
`resp.deadlock_reason().size() == resp.status().size()` will always be true, which isn't the case. If the transaction coordinator is still on an older version, `deadlock_reason` field isn't populated. Accessing the field without checking
the size is leading to a segv fault.
This diff fixes the issue by explicitly check the size of `deadlock_reason` before accessing the field, ensuring that we handle upgrade scenarios gracefully.
Jira: DB-3597, DB-7266
Test Plan: Jenkins
Reviewers: rsami, arybochkin, sergei
Reviewed By: rsami, arybochkin
Subscribers: ybase
Differential Revision: https://phorge.dev.yugabyte.com/D27023
Jira Link: DB-7266
Description
Master universe upgrade failed from b250-> b332
A regression perhaps caused by the commit- d6d0cf6
from the core file
Code
The code does not check the size of response.deadlock_reason and tries to access it by an index unconditionally. However the structure is empty for this case-
response.deadlock_reason
can be empty when the response is received from a tablet server, which is not yet updated and that tablet server knows nothing about deadlock_reason.Thanks, @arybochkin !
Warning: Please confirm that this issue does not contain any sensitive information
The text was updated successfully, but these errors were encountered: