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

Issue 2314933005: Align IndexedDB metadata rollback on transaction abort to spec. (Closed)

Created:
4 years, 3 months ago by pwnall
Modified:
4 years, 2 months ago
Reviewers:
jsbell, cmumford
CC:
chromium-reviews, blink-reviews, haraken, jsbell+idb_chromium.org, cmumford
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Align IndexedDB metadata rollback on transaction abort to spec. When an IndexedDB versionchange transaction is aborted, Blink's IndexedDB metadata is not entirely reverted, causing our behavior to deviate from the IndexedDB specification in minor, subtle ways. This change aligns our behavior with the spec and with Firefox's implementation. The change also (slightly) reduces IndexedDB memory usage in two ways. (1) Object store and index metadata is now shared between an IDBDatabase and its associated IDBObjectStore and IDBIndex instances, instead of being copied. (2) versionchange transactions only back up the metadata for object stores that are accessed by JavaScript, instead of creating a backup for the entire database metadata. BUG=645018, 457447 Committed: https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d Cr-Commit-Position: refs/heads/master@{#423742}

Patch Set 1 : Add failing tests. #

Patch Set 2 : Uncommented tests that Firefox fails. #

Patch Set 3 : Rebased. #

Total comments: 14

Patch Set 4 : Addressed feedback, removed Own types. (take 2) #

Patch Set 5 : CL for src perf tryjob to run storage.indexeddb_endure_tracing benchmark on mac-retina platform(s) #

Patch Set 6 : CL for src perf tryjob to run storage.indexeddb_endure_tracing benchmark on linux platform(s) #

Patch Set 7 : Rebased. #

Total comments: 28

Patch Set 8 : Documented tests that currently fail in Firefox. #

Patch Set 9 : Addressed some feedback. #

Patch Set 10 : Removed test TODOs, because Firefox nightly passes all the tests. #

Patch Set 11 : Rebased past the big reformat. #

Total comments: 28

Patch Set 12 : Rebased #

Patch Set 13 : Addressed feedback. #

Total comments: 16

Patch Set 14 : Addressed feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1690 lines, -233 lines) Patch
A third_party/WebKit/LayoutTests/storage/indexeddb/rename-index-abort.html View 1 chunk +110 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/storage/indexeddb/rename-object-store-abort.html View 1 chunk +120 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/storage/indexeddb/resources/rename-common.js View 1 1 chunk +13 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/storage/indexeddb/transaction-abort-generator-revert.html View 1 1 chunk +108 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/storage/indexeddb/transaction-abort-index-metadata-revert.html View 1 8 9 1 chunk +276 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/storage/indexeddb/transaction-abort-multiple-metadata-revert.html View 1 8 9 1 chunk +291 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/storage/indexeddb/transaction-abort-object-store-metadata-revert.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +233 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +10 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +49 lines, -39 lines 0 comments Download
M third_party/WebKit/Source/modules/indexeddb/IDBIndex.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +25 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/indexeddb/IDBIndex.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +12 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/modules/indexeddb/IDBMetadata.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +40 lines, -38 lines 0 comments Download
M third_party/WebKit/Source/modules/indexeddb/IDBMetadata.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +71 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +48 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 12 chunks +97 lines, -48 lines 0 comments Download
M third_party/WebKit/Source/modules/indexeddb/IDBOpenDBRequest.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/indexeddb/IDBTransaction.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +50 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 9 chunks +131 lines, -37 lines 0 comments Download
M third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 104 (83 generated)
pwnall
PTAL.
4 years, 3 months ago (2016-09-16 06:38:02 UTC) #26
jsbell
test l*g*t*m I'm still working my way through the cpp/h changes. The introduction of the ...
4 years, 3 months ago (2016-09-16 18:17:29 UTC) #35
pwnall
jsbell: Thank you very much for the quick initial feedback! Regarding the Own datatypes -- ...
4 years, 3 months ago (2016-09-16 20:03:56 UTC) #36
jsbell
On 2016/09/16 20:03:56, pwnall wrote: > Do you agree with turning the metadata structs into ...
4 years, 3 months ago (2016-09-16 20:25:21 UTC) #37
jsbell
On 2016/09/16 20:25:21, jsbell wrote: > On 2016/09/16 20:03:56, pwnall wrote: > > Do you ...
4 years, 3 months ago (2016-09-16 23:25:02 UTC) #38
pwnall
jsbell: Thank you for helping me make this code better! I addressed all the feedback ...
4 years, 3 months ago (2016-09-17 01:34:22 UTC) #42
pwnall
CL for src perf tryjob to run storage.indexeddb_endure_tracing benchmark on mac-retina platform(s)
4 years, 3 months ago (2016-09-19 21:37:33 UTC) #57
pwnall
CL for src perf tryjob to run storage.indexeddb_endure_tracing benchmark on linux platform(s)
4 years, 3 months ago (2016-09-19 21:40:59 UTC) #59
jsbell
Some nits, some requests for comments, and some concerns about strategy. https://codereview.chromium.org/2314933005/diff/440001/third_party/WebKit/Source/modules/indexeddb/IDBMetadata.h File third_party/WebKit/Source/modules/indexeddb/IDBMetadata.h (right): ...
4 years, 2 months ago (2016-09-26 22:23:41 UTC) #65
pwnall
jsbell: Thank you for going through the code so quickly after you got back! Can ...
4 years, 2 months ago (2016-09-27 00:12:19 UTC) #69
pwnall
cmumford: Can you PTAL? jsbell OK-ed the tests, and we're wondering what you think about ...
4 years, 2 months ago (2016-09-27 20:17:07 UTC) #73
cmumford
lgtm % nits https://codereview.chromium.org/2314933005/diff/520001/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp File third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp (right): https://codereview.chromium.org/2314933005/diff/520001/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp#newcode133 third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp:133: void IDBDatabase::setDatabaseMetadata(const IDBDatabaseMetadata& metadata) { I ...
4 years, 2 months ago (2016-10-05 21:15:26 UTC) #82
pwnall
Woohoo! Thank you very much for the review! I have a couple of questions below. ...
4 years, 2 months ago (2016-10-05 23:15:45 UTC) #85
jsbell
https://codereview.chromium.org/2314933005/diff/440001/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.h File third_party/WebKit/Source/modules/indexeddb/IDBTransaction.h (right): https://codereview.chromium.org/2314933005/diff/440001/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.h#newcode122 third_party/WebKit/Source/modules/indexeddb/IDBTransaction.h:122: int64_t oldMaxObjectStoreId() const On 2016/09/27 00:12:19, pwnall wrote: > ...
4 years, 2 months ago (2016-10-06 20:01:32 UTC) #88
cmumford
https://codereview.chromium.org/2314933005/diff/520001/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp File third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp (right): https://codereview.chromium.org/2314933005/diff/520001/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp#newcode412 third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp:412: WebIDBDatabase* IDBTransaction::backendDB() const { What Josh said, plus moving ...
4 years, 2 months ago (2016-10-06 20:22:55 UTC) #89
pwnall
jsbell: PTAL? https://codereview.chromium.org/2314933005/diff/440001/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.h File third_party/WebKit/Source/modules/indexeddb/IDBTransaction.h (right): https://codereview.chromium.org/2314933005/diff/440001/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.h#newcode122 third_party/WebKit/Source/modules/indexeddb/IDBTransaction.h:122: int64_t oldMaxObjectStoreId() const On 2016/10/06 20:01:31, jsbell ...
4 years, 2 months ago (2016-10-06 22:15:23 UTC) #93
jsbell
lgtm
4 years, 2 months ago (2016-10-06 22:31:51 UTC) #94
pwnall
On 2016/10/06 22:31:51, jsbell wrote: > lgtm Thank you for the quick turnaround!
4 years, 2 months ago (2016-10-06 22:33:15 UTC) #95
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/2314933005/600001
4 years, 2 months ago (2016-10-06 23:37:14 UTC) #100
commit-bot: I haz the power
Committed patchset #14 (id:600001)
4 years, 2 months ago (2016-10-06 23:44:27 UTC) #102
commit-bot: I haz the power
4 years, 2 months ago (2016-10-06 23:46:03 UTC) #104
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d
Cr-Commit-Position: refs/heads/master@{#423742}

Powered by Google App Engine
This is Rietveld 408576698