-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
99757: flowinfra: fix possible use of 'flow' span after Finish r=yuzefovich a=yuzefovich This commit fixes a recently introduced bug where we could use the already finished tracing span of the flow. In particular, this could occur since we now unconditionally call `ctxCancel` when connecting inbound streams if that connection fails for any reason. If that failure occurs after the flow has already been cleaned up, then its span would be finished, so further accesses are disallowed. This is now fixed by adjusting the existing `Flow.Cancel` method to consider whether the cleanup has already been performed. This required hiding the flow's status behind the mutex but it should have a negligible synchronization overhead. Fixes: #99461. Release note: None 99760: sql: make deadline errors retryable r=ajwerner a=ajwerner If a transaction gets finds itself with a deadline before its current timestamp, something that can happen when there are schema changes or when the sqlliveness subsystem is unavailable, we ought to retry the transaction. Today, an assertion failure is sent. This is the wrong behavior. In order to achieve the desired goal, we detect the scenario in MaybeUpdateDeadline and we return an error which implements the appropriate interface to be interpreted as a retry error in the pgwire and sql layers. This change does a few other little things: 1) It simplies the logic to check whether an error is retriable so that all errors which pgwire will treat as client-visible retries are treated as retriable internally. In addition, we retain certain additional checks for retriable errors the sql layer handles explicitly. 2) It makes sure to reset the sqlliveness session in the descs.Collection when restarting transactions. Not doing this, on the one hand, was an oversight that meant that if the session turned over internally, then restarts wouldn't see it. However, it's not actually a bug today because only secondary tenants set the session, and they never acquire a new session. The test utilizes sessions rather than descriptors because the testing knob infrastructure is easier to manipulate. Fixes: #96336 Backports will deal with #76727 Release note (bug fix): In rare cases involving overload and schema changes, users could sometimes, transiently, see errors of the form "deadline below read timestamp is nonsensical; txn has would have no chance to commit". These errors carried and internal pgcode and could not be retried. This form of error is now classified as a retriable error and will be retried automatically either by the client or internally. 99815: ci: don't stress `integration` tests r=healthy-pod a=rickystewart Epic: none Release note: None Co-authored-by: Yahor Yuzefovich <[email protected]> Co-authored-by: ajwerner <[email protected]> Co-authored-by: Ricky Stewart <[email protected]>
- Loading branch information
Showing
19 changed files
with
310 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.