Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(692)

Issue 9768006: Implement sql::Connection::Raze() in terms of sqlite3_backup API. (Closed)

Created:
8 years, 9 months ago by Scott Hess - ex-Googler
Modified:
8 years, 8 months ago
Reviewers:
Greg Billock
CC:
chromium-reviews
Visibility:
Public.

Description

Implement sql::Connection::Raze() in terms of sqlite3_backup API. Wraps up the notion of reseting a database in a way which respects SQLite locking constraints and doesn't require closing the database. A similar outcome could be managed using filesystem operations, which requires coordination between clients of the database to make sure that no corruption occurs due to incorrect handling of -journal files. Also, Windows pins files until the last handle closes, making that approach challenging in some cases. BUG=none TEST=none ADDENDUM: had to git cl dcommit, and things froze, it looked weird, I thought maybe I needed to re-sync with trunk, so hit Ctrl-C and resync'ed. Code already landed: http://src.chromium.org/viewvc/chrome?view=rev&revision=131167

Patch Set 1 #

Patch Set 2 : cleanup and moar testz. #

Total comments: 21

Patch Set 3 : gbillock comments. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+232 lines, -1 line) Patch
M sql/connection.h View 1 1 chunk +20 lines, -0 lines 0 comments Download
M sql/connection.cc View 1 2 1 chunk +79 lines, -0 lines 1 comment Download
M sql/connection_unittest.cc View 1 2 3 chunks +133 lines, -1 line 0 comments Download

Messages

Total messages: 15 (0 generated)
Scott Hess - ex-Googler
I also have a sqlite3_raze() implementation using btree.c internals, but this seemed safer. I plan ...
8 years, 9 months ago (2012-03-21 19:54:09 UTC) #1
Greg Billock
http://codereview.chromium.org/9768006/diff/5001/sql/connection.cc File sql/connection.cc (right): http://codereview.chromium.org/9768006/diff/5001/sql/connection.cc#newcode190 sql/connection.cc:190: // Propagate the page size to the new database. ...
8 years, 8 months ago (2012-03-31 01:23:50 UTC) #2
Scott Hess - ex-Googler
Thanks for the review - I had entirely forgotten about this CL :-). I'm thinking ...
8 years, 8 months ago (2012-04-04 01:28:25 UTC) #3
Scott Hess - ex-Googler
commentated and modified to use -1 and DCHECK on not-one-page case. http://codereview.chromium.org/9768006/diff/5001/sql/connection.cc File sql/connection.cc (right): ...
8 years, 8 months ago (2012-04-04 19:26:53 UTC) #4
Greg Billock
lgtm http://codereview.chromium.org/9768006/diff/5001/sql/connection.h File sql/connection.h (right): http://codereview.chromium.org/9768006/diff/5001/sql/connection.h#newcode187 sql/connection.h:187: // filesystem operations problematic). Returns true if the ...
8 years, 8 months ago (2012-04-04 19:49:21 UTC) #5
Scott Hess - ex-Googler
I'm going to stop adding comments, because I could spend eternity debating with myself about ...
8 years, 8 months ago (2012-04-04 20:28:52 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shess@chromium.org/9768006/11001
8 years, 8 months ago (2012-04-04 20:30:12 UTC) #7
commit-bot: I haz the power
Try job failure for 9768006-11001 (retry) on win_rel for step "browser_tests". It's a second try, ...
8 years, 8 months ago (2012-04-05 00:20:23 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shess@chromium.org/9768006/11001
8 years, 8 months ago (2012-04-05 19:46:08 UTC) #9
commit-bot: I haz the power
Try job failure for 9768006-11001 (retry) on linux_chromeos for step "compile" (clobber build). It's a ...
8 years, 8 months ago (2012-04-05 20:19:00 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shess@chromium.org/9768006/11001
8 years, 8 months ago (2012-04-05 20:51:30 UTC) #11
commit-bot: I haz the power
Try job failure for 9768006-11001 (retry) on win_rel for step "browser_tests". It's a second try, ...
8 years, 8 months ago (2012-04-06 01:02:23 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shess@chromium.org/9768006/11001
8 years, 8 months ago (2012-04-06 16:03:52 UTC) #13
commit-bot: I haz the power
Try job failure for 9768006-11001 (retry) on win_rel for step "browser_tests". It's a second try, ...
8 years, 8 months ago (2012-04-06 19:15:14 UTC) #14
Scott Hess - ex-Googler
8 years, 8 months ago (2012-04-06 19:37:31 UTC) #15
On 2012/04/06 19:15:14, I haz the power (commit-bot) wrote:
> Try job failure for 9768006-11001 (retry) on win_rel for step "browser_tests".
> It's a second try, previously, step "browser_tests" failed.
>
http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&nu...

Awesome.  Lessee if these things can still be landed the old-fashioned way...

Powered by Google App Engine
This is Rietveld 408576698