forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kv: resolve only intents in rangefeed's own range from txnPushAttempt
Fixes cockroachdb#66741. Before this change, `(*txnPushAttempt).pushOldTxns` would resolve all of a committed or aborted transaction's intents that it discovered during a push, instead of just those in the current range. This was unnecessary for the purposes of the rangefeed, which only needs a pushed transaction's intents in its range resolved. Worse, it could result in quadratic behavior in cases where a large transaction wrote many intents across many ranges that each had an active rangefeed processor. In such cases, the rangefeed processor on each of the ranges that the transaction touched would try to resolve its intents across all ranges that the transaction touched. This could lead to a herd of redundant intent resolution, which was especially disruptive if the transaction had exceeded its precise intent span tracking and degraded to ranged intent resolution. This commit fixes this issue by having each rangefeed processor resolve only those intents that are within the bounds of its own range. This avoids the quadratic behavior that, in its worst form, could create a pileup of ranged intent resolution across an entire table and starve out foreground traffic. Release note (bug fix): Changefeeds no longer interact poorly with large, abandoned transactions. It was previously possible for this combination to result in a cascade of work during transaction cleanup that could starve out foreground traffic.
- Loading branch information
1 parent
53c1ebe
commit ea77990
Showing
5 changed files
with
163 additions
and
19 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