-
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.
38668: storage: Make Put handle WriteTooOldError more like CPut r=nvanbenschoten,knz a=bdarnell CPut (used by INSERT) and Put (used by UPDATE) previously handled WriteTooOldErrors differently: CPut would return them immediately while Put would defer them to the end of the transaction. This commit makes Put work (mostly) like CPut. The major benefit of this change is that if the first statement of a transaction is an UPDATE, it will no longer be possible for it to return transaction-retry errors due to SQL-level automatic retries. (This was already true for INSERT. Note that an ON CONFLICT DO UPDATE clause acts like a standalone UPDATE in this respect) A potential downside is that UPDATE-heavy workloads experiencing high contention on many keys may have worse performance (up to O(n^2)). Updates #38591 Release note (sql change): The first statement of a transaction will no longer return a transaction-retry error if it is an UPDATE or DELETE (this was already true for INSERT). Co-authored-by: Ben Darnell <[email protected]>
- Loading branch information
Showing
18 changed files
with
854 additions
and
634 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.