forked from chromium/chromium
-
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.
Fail early in sql::MetaTable::Init if setting versions fails
An incorrect version number can cause issues with migrations, including crashes, so Init should function atomically and only commit its transaction if all meta table operations succeeded. We accomplish this by returning success/failure from the two version- setter methods, which also allows callers to return early from their own migration code. Change-Id: I2ed6ad38623ff46a53711e3d1041f8878a546cc1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4228100 Reviewed-by: Austin Sullivan <asully@chromium.org> Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org> Quick-Run: Andrew Paseltiner <apaseltiner@chromium.org> Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#1102399}
- Loading branch information
Andrew Paseltiner
authored and
Chromium LUCI CQ
committed
Feb 7, 2023
1 parent
b78df26
commit 423a131
Showing
2 changed files
with
16 additions
and
9 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