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

Issue 2773823002: Use a two-part data format version in IndexedDB metadata. (Closed)

Created:
3 years, 9 months ago by jbroman
Modified:
3 years, 8 months ago
Reviewers:
jam, cmumford, dcheng, jsbell
CC:
Aaron Boodman, abarth-chromium, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, dglazkov+blink, dmurph, jsbell+idb_chromium.org, kinuko+watch, pwnall, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use a two-part data format version in IndexedDB metadata. This breaks the 64-bit data format version stored in the database metadata into two 32-bit parts (V8 and Blink format versions), and allows them to be compared by checking that the database uses supported versions of both. If either component has reverted, the database is deemed to be from the future (i.e. corrupt). BUG=704293 Review-Url: https://codereview.chromium.org/2773823002 Cr-Commit-Position: refs/heads/master@{#466002} Committed: https://chromium.googlesource.com/chromium/src/+/3ee0c8ab5180fb87ce012b784bb47a3da507c1a0

Patch Set 1 #

Patch Set 2 : correct path #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : partially revert test change #

Total comments: 8

Patch Set 7 : jsbell, cmumford #

Total comments: 8

Patch Set 8 : compile-time #

Patch Set 9 : move to content/browser/ #

Patch Set 10 : static #

Total comments: 4

Patch Set 11 : base::MakeShared #

Total comments: 3

Patch Set 12 : fix comment #

Total comments: 2

Patch Set 13 : merge with origin/master #

Patch Set 14 : rename blink constants #

Unified diffs Side-by-side diffs Delta from patch set Stats (+205 lines, -25 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/indexed_db/indexed_db_backing_store.cc View 1 2 3 4 5 6 7 8 9 10 11 12 9 chunks +24 lines, -21 lines 0 comments Download
A content/browser/indexed_db/indexed_db_data_format_version.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +72 lines, -0 lines 0 comments Download
A content/browser/indexed_db/indexed_db_data_format_version.cc View 1 2 3 4 5 6 7 8 1 chunk +16 lines, -0 lines 0 comments Download
M content/browser/indexed_db/indexed_db_factory_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +86 lines, -3 lines 0 comments Download
M content/browser/indexed_db/leveldb_coding_scheme.md View 1 2 3 4 5 6 2 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 100 (66 generated)
jbroman
This change requires extra scrutiny because it deals with the schema logic (and so causes ...
3 years, 8 months ago (2017-03-29 21:13:22 UTC) #26
cmumford
https://codereview.chromium.org/2773823002/diff/100001/content/common/indexed_db/indexed_db_struct_traits.cc File content/common/indexed_db/indexed_db_struct_traits.cc (right): https://codereview.chromium.org/2773823002/diff/100001/content/common/indexed_db/indexed_db_struct_traits.cc#newcode256 content/common/indexed_db/indexed_db_struct_traits.cc:256: }; Delete semicolon.
3 years, 8 months ago (2017-04-03 16:55:03 UTC) #30
jsbell
lgtm ; still pondering the TODOs around how to fail. https://codereview.chromium.org/2773823002/diff/100001/content/common/indexed_db/indexed_db_data_format_version.h File content/common/indexed_db/indexed_db_data_format_version.h (right): https://codereview.chromium.org/2773823002/diff/100001/content/common/indexed_db/indexed_db_data_format_version.h#newcode40 ...
3 years, 8 months ago (2017-04-03 18:08:26 UTC) #31
jsbell
On 2017/03/29 21:13:22, jbroman wrote: > It seems that this is the behavior that was ...
3 years, 8 months ago (2017-04-03 18:13:24 UTC) #32
jbroman
+dcheng for SECURITY_OWNERS (mojom change) My TODOs for how we'd like to handle the error ...
3 years, 8 months ago (2017-04-04 18:50:38 UTC) #34
jsbell
https://codereview.chromium.org/2773823002/diff/120001/content/browser/indexed_db/indexed_db_dispatcher_host.cc File content/browser/indexed_db/indexed_db_dispatcher_host.cc (right): https://codereview.chromium.org/2773823002/diff/120001/content/browser/indexed_db/indexed_db_dispatcher_host.cc#newcode102 content/browser/indexed_db/indexed_db_dispatcher_host.cc:102: // TODO(jbroman): We could take mojo::GetBadMessageCallback here to tell ...
3 years, 8 months ago (2017-04-04 19:24:33 UTC) #37
dcheng
https://codereview.chromium.org/2773823002/diff/120001/content/browser/indexed_db/indexed_db_backing_store.h File content/browser/indexed_db/indexed_db_backing_store.h (right): https://codereview.chromium.org/2773823002/diff/120001/content/browser/indexed_db/indexed_db_backing_store.h#newcode379 content/browser/indexed_db/indexed_db_backing_store.h:379: const IndexedDBDataFormatVersion data_format_version() const { Nit: no const and ...
3 years, 8 months ago (2017-04-04 19:59:21 UTC) #38
cmumford
I'm probably just missing something. I'm wondering why each Render process really needs to inform, ...
3 years, 8 months ago (2017-04-04 22:50:18 UTC) #41
jbroman
On 2017/04/04 at 22:50:18, cmumford wrote: > I'm probably just missing something. I'm wondering why ...
3 years, 8 months ago (2017-04-04 23:22:13 UTC) #42
jbroman
On 2017/04/04 at 23:22:13, jbroman wrote: > On 2017/04/04 at 22:50:18, cmumford wrote: > > ...
3 years, 8 months ago (2017-04-04 23:23:04 UTC) #43
dcheng
On 2017/04/04 23:23:04, jbroman wrote: > On 2017/04/04 at 23:22:13, jbroman wrote: > > On ...
3 years, 8 months ago (2017-04-04 23:37:34 UTC) #44
cmumford
https://codereview.chromium.org/2773823002/diff/120001/third_party/WebKit/public/web/WebSerializedScriptValueVersion.h File third_party/WebKit/public/web/WebSerializedScriptValueVersion.h (right): https://codereview.chromium.org/2773823002/diff/120001/third_party/WebKit/public/web/WebSerializedScriptValueVersion.h#newcode52 third_party/WebKit/public/web/WebSerializedScriptValueVersion.h:52: uint32_t v8Version = 0; v8 has a major and ...
3 years, 8 months ago (2017-04-05 21:23:18 UTC) #45
jbroman
https://codereview.chromium.org/2773823002/diff/120001/third_party/WebKit/public/web/WebSerializedScriptValueVersion.h File third_party/WebKit/public/web/WebSerializedScriptValueVersion.h (right): https://codereview.chromium.org/2773823002/diff/120001/third_party/WebKit/public/web/WebSerializedScriptValueVersion.h#newcode52 third_party/WebKit/public/web/WebSerializedScriptValueVersion.h:52: uint32_t v8Version = 0; On 2017/04/05 at 21:23:18, cmumford ...
3 years, 8 months ago (2017-04-05 21:27:10 UTC) #46
cmumford
jbroman@ here's what I'm suggesting - see: https://codereview.chromium.org/2798083003/ With an approach like the one above, ...
3 years, 8 months ago (2017-04-05 21:38:11 UTC) #47
jbroman
On 2017/04/05 at 21:38:11, cmumford wrote: > jbroman@ here's what I'm suggesting - see: https://codereview.chromium.org/2798083003/ ...
3 years, 8 months ago (2017-04-05 21:45:06 UTC) #48
cmumford
Thanks jbroman@. Great explanation and I now understand your predicament.
3 years, 8 months ago (2017-04-05 22:33:36 UTC) #49
jbroman
PTAL; this reverts to computing this at compile time. Will require follow-ups: V8: https://codereview.chromium.org/2804643006 Chromium: ...
3 years, 8 months ago (2017-04-06 21:09:04 UTC) #57
dcheng
https://codereview.chromium.org/2773823002/diff/180001/content/browser/indexed_db/indexed_db_data_format_version.cc File content/browser/indexed_db/indexed_db_data_format_version.cc (right): https://codereview.chromium.org/2773823002/diff/180001/content/browser/indexed_db/indexed_db_data_format_version.cc#newcode14 content/browser/indexed_db/indexed_db_data_format_version.cc:14: blink::kSerializedScriptValueVersion); Is there a guarantee that this will avoid ...
3 years, 8 months ago (2017-04-06 21:14:19 UTC) #58
jbroman
https://codereview.chromium.org/2773823002/diff/180001/content/browser/indexed_db/indexed_db_data_format_version.cc File content/browser/indexed_db/indexed_db_data_format_version.cc (right): https://codereview.chromium.org/2773823002/diff/180001/content/browser/indexed_db/indexed_db_data_format_version.cc#newcode14 content/browser/indexed_db/indexed_db_data_format_version.cc:14: blink::kSerializedScriptValueVersion); On 2017/04/06 at 21:14:19, dcheng wrote: > Is ...
3 years, 8 months ago (2017-04-06 21:26:25 UTC) #59
dcheng
non-owner lgtm -- this approach seems reasonable to me. https://codereview.chromium.org/2773823002/diff/180001/content/browser/indexed_db/indexed_db_factory_unittest.cc File content/browser/indexed_db/indexed_db_factory_unittest.cc (right): https://codereview.chromium.org/2773823002/diff/180001/content/browser/indexed_db/indexed_db_factory_unittest.cc#newcode551 content/browser/indexed_db/indexed_db_factory_unittest.cc:551: ...
3 years, 8 months ago (2017-04-07 06:36:04 UTC) #62
jbroman
https://codereview.chromium.org/2773823002/diff/180001/content/browser/indexed_db/indexed_db_factory_unittest.cc File content/browser/indexed_db/indexed_db_factory_unittest.cc (right): https://codereview.chromium.org/2773823002/diff/180001/content/browser/indexed_db/indexed_db_factory_unittest.cc#newcode551 content/browser/indexed_db/indexed_db_factory_unittest.cc:551: auto db_callbacks = make_scoped_refptr(new MockIndexedDBDatabaseCallbacks); On 2017/04/07 at 06:36:04, ...
3 years, 8 months ago (2017-04-07 14:27:50 UTC) #65
jsbell
https://codereview.chromium.org/2773823002/diff/200001/content/browser/indexed_db/indexed_db_backing_store.cc File content/browser/indexed_db/indexed_db_backing_store.cc (right): https://codereview.chromium.org/2773823002/diff/200001/content/browser/indexed_db/indexed_db_backing_store.cc#newcode119 content/browser/indexed_db/indexed_db_backing_store.cc:119: const int64_t kLatestKnownSchemaVersion = 3; Just calling out: we're ...
3 years, 8 months ago (2017-04-07 16:30:02 UTC) #68
jbroman
https://codereview.chromium.org/2773823002/diff/200001/content/browser/indexed_db/indexed_db_data_format_version.h File content/browser/indexed_db/indexed_db_data_format_version.h (right): https://codereview.chromium.org/2773823002/diff/200001/content/browser/indexed_db/indexed_db_data_format_version.h#newcode48 content/browser/indexed_db/indexed_db_data_format_version.h:48: // Since negative values are considered invalid, this scheme ...
3 years, 8 months ago (2017-04-07 17:50:15 UTC) #71
jbroman
jsbell, cmumford: double-checking that this approach lgty before I ask for v8-side review
3 years, 8 months ago (2017-04-10 14:11:34 UTC) #74
jsbell
On 2017/04/10 14:11:34, jbroman wrote: > jsbell, cmumford: double-checking that this approach lgty before I ...
3 years, 8 months ago (2017-04-10 16:16:00 UTC) #75
cmumford
Apologies for taking so long - was out Friday. https://codereview.chromium.org/2773823002/diff/220001/content/browser/indexed_db/indexed_db_backing_store.cc File content/browser/indexed_db/indexed_db_backing_store.cc (right): https://codereview.chromium.org/2773823002/diff/220001/content/browser/indexed_db/indexed_db_backing_store.cc#newcode1140 content/browser/indexed_db/indexed_db_backing_store.cc:1140: ...
3 years, 8 months ago (2017-04-10 17:35:12 UTC) #76
jbroman
https://codereview.chromium.org/2773823002/diff/220001/content/browser/indexed_db/indexed_db_backing_store.cc File content/browser/indexed_db/indexed_db_backing_store.cc (right): https://codereview.chromium.org/2773823002/diff/220001/content/browser/indexed_db/indexed_db_backing_store.cc#newcode1140 content/browser/indexed_db/indexed_db_backing_store.cc:1140: WARN_UNUSED_RESULT Status IndexedDBBackingStore::SetUpMetadata() { On 2017/04/10 at 17:35:12, cmumford ...
3 years, 8 months ago (2017-04-11 15:09:20 UTC) #77
cmumford
lgtm
3 years, 8 months ago (2017-04-11 19:11:39 UTC) #78
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2773823002/220001
3 years, 8 months ago (2017-04-18 19:17:26 UTC) #81
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/414109)
3 years, 8 months ago (2017-04-18 19:26:31 UTC) #83
jbroman
+jam for content/browser/BUILD.gn
3 years, 8 months ago (2017-04-19 18:51:50 UTC) #91
jam
On 2017/04/19 18:51:50, jbroman wrote: > +jam for content/browser/BUILD.gn lgtm maybe time to add a ...
3 years, 8 months ago (2017-04-20 00:18:48 UTC) #94
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2773823002/260001
3 years, 8 months ago (2017-04-20 14:21:46 UTC) #97
commit-bot: I haz the power
3 years, 8 months ago (2017-04-20 14:25:18 UTC) #100
Message was sent while issue was closed.
Committed patchset #14 (id:260001) as
https://chromium.googlesource.com/chromium/src/+/3ee0c8ab5180fb87ce012b784bb4...

Powered by Google App Engine
This is Rietveld 408576698