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

Issue 1428843002: LeveldbValueStore: Deleting db when open fails due to corruption. (Closed)

Created:
5 years, 1 month ago by cmumford
Modified:
5 years, 1 month ago
Reviewers:
Devlin, rkaplow
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, asvitkine+watch_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

LeveldbValueStore: Deleting db when open fails due to corruption. Corrupted databases would never be deleted. This change will delete the leveldb database iff an open attempt fails as a result of corruption. This class is currently used by the Extensions component in Chrome. BUG=549177 Committed: https://crrev.com/b3e2c306a1adcb117f4134281dfcf0cb6ac2467f Cr-Commit-Position: refs/heads/master@{#358722}

Patch Set 1 #

Patch Set 2 : base::File::DeleteFile -> base::DeleteFile #

Total comments: 3

Patch Set 3 : Handling database Get errors (when corrupted). #

Patch Set 4 : EnsureDbIsOpen calling Restore when corrupted, also Recover -> Restore #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -22 lines) Patch
M extensions/browser/value_store/leveldb_value_store.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M extensions/browser/value_store/leveldb_value_store.cc View 1 2 3 6 chunks +40 lines, -21 lines 2 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 3 chunks +22 lines, -0 lines 3 comments Download

Messages

Total messages: 23 (2 generated)
cmumford
rkaplow@chromium.org: Please review changes in histograms.xml rdevlin.cronin@chromium.org: Please review of all changes. Two notes: 1) ...
5 years, 1 month ago (2015-10-29 16:57:38 UTC) #2
Devlin
> 2) I don't know if any of the Extensions db's would be candidates to ...
5 years, 1 month ago (2015-10-29 17:57:26 UTC) #3
cmumford
Devlin: Just to give you a preview of what I think is missing (error wise). ...
5 years, 1 month ago (2015-10-29 22:34:22 UTC) #4
Devlin
https://codereview.chromium.org/1428843002/diff/20001/extensions/browser/value_store/leveldb_value_store.cc File extensions/browser/value_store/leveldb_value_store.cc (right): https://codereview.chromium.org/1428843002/diff/20001/extensions/browser/value_store/leveldb_value_store.cc#newcode360 extensions/browser/value_store/leveldb_value_store.cc:360: // We do not currently recover from corrupted databases, ...
5 years, 1 month ago (2015-10-30 20:13:17 UTC) #5
cmumford
On 2015/10/30 20:13:17, Devlin wrote: > https://codereview.chromium.org/1428843002/diff/20001/extensions/browser/value_store/leveldb_value_store.cc > File extensions/browser/value_store/leveldb_value_store.cc (right): > > https://codereview.chromium.org/1428843002/diff/20001/extensions/browser/value_store/leveldb_value_store.cc#newcode360 > ...
5 years, 1 month ago (2015-11-02 17:28:28 UTC) #6
Devlin
On 2015/11/02 17:28:28, cmumford wrote: > On 2015/10/30 20:13:17, Devlin wrote: > > > https://codereview.chromium.org/1428843002/diff/20001/extensions/browser/value_store/leveldb_value_store.cc ...
5 years, 1 month ago (2015-11-02 17:55:26 UTC) #7
cmumford
> Hmm, EnsureDbIsOpen seems to only be called from Get/Set/Remove, which I think > were ...
5 years, 1 month ago (2015-11-03 00:44:31 UTC) #8
Devlin
On 2015/11/03 00:44:31, cmumford wrote: > > Hmm, EnsureDbIsOpen seems to only be called from ...
5 years, 1 month ago (2015-11-03 17:00:06 UTC) #9
cmumford
> > Sorry, might have been unclear. What I'd like to see is a single ...
5 years, 1 month ago (2015-11-05 21:37:38 UTC) #10
Devlin
On 2015/11/05 21:37:38, cmumford wrote: > > > > Sorry, might have been unclear. What ...
5 years, 1 month ago (2015-11-05 22:04:02 UTC) #11
cmumford
> All those classes actually eventually reach a LevelDBValueStore (except the > testing ones, of ...
5 years, 1 month ago (2015-11-05 22:05:38 UTC) #12
cmumford
Devlin: Here's the version with EnsureDbIsOpen calling Restore. I decided to move the ::Get() error ...
5 years, 1 month ago (2015-11-06 18:37:50 UTC) #13
Devlin
Much cleaner! :) Restore() is really only called in two circumstances: 1. When something (a ...
5 years, 1 month ago (2015-11-06 18:55:34 UTC) #14
cmumford
On 2015/11/06 18:55:34, Devlin wrote: > Much cleaner! :) > > Restore() is really only ...
5 years, 1 month ago (2015-11-06 19:16:05 UTC) #15
Devlin
On 2015/11/06 19:16:05, cmumford wrote: > On 2015/11/06 18:55:34, Devlin wrote: > > Much cleaner! ...
5 years, 1 month ago (2015-11-06 19:54:46 UTC) #16
Devlin
On 2015/11/06 19:16:05, cmumford wrote: > On 2015/11/06 18:55:34, Devlin wrote: > > Much cleaner! ...
5 years, 1 month ago (2015-11-06 19:54:47 UTC) #17
rkaplow
lgtm https://codereview.chromium.org/1428843002/diff/60001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1428843002/diff/60001/tools/metrics/histograms/histograms.xml#newcode64970 tools/metrics/histograms/histograms.xml:64970: + <int value="2" label="Repair Success"/> On 2015/11/06 19:54:46, ...
5 years, 1 month ago (2015-11-06 23:06:51 UTC) #18
cmumford
Should be landing shortly. https://codereview.chromium.org/1428843002/diff/60001/extensions/browser/value_store/leveldb_value_store.cc File extensions/browser/value_store/leveldb_value_store.cc (right): https://codereview.chromium.org/1428843002/diff/60001/extensions/browser/value_store/leveldb_value_store.cc#newcode76 extensions/browser/value_store/leveldb_value_store.cc:76: restore_histogram_ = base::LinearHistogram::FactoryGet( On 2015/11/06 ...
5 years, 1 month ago (2015-11-09 23:04:22 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1428843002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1428843002/60001
5 years, 1 month ago (2015-11-09 23:06:12 UTC) #21
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 1 month ago (2015-11-10 00:54:46 UTC) #22
commit-bot: I haz the power
5 years, 1 month ago (2015-11-10 00:55:30 UTC) #23
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/b3e2c306a1adcb117f4134281dfcf0cb6ac2467f
Cr-Commit-Position: refs/heads/master@{#358722}

Powered by Google App Engine
This is Rietveld 408576698