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

Issue 2084053004: IndexedDB: Defer delete calls when there is a running upgrade (Closed)

Created:
4 years, 6 months ago by jsbell
Modified:
4 years, 5 months ago
Reviewers:
palakj1, palakj, cmumford
CC:
blink-reviews, chromium-reviews, cmumford, darin-cc_chromium.org, jam, jsbell+idb_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

IndexedDB: Defer delete calls when there is a running upgrade Database open requests enter a limbo state when there is an upgrade running - the request neither proceeds nor blocks, since there is no successfully opened request to receive the "versionchange" event. The same should be true for database delete requests, otherwise either the delete happens during the upgrade (bad!) or is blocked but the open connection is unaware of the request and can't close itself (also bad!). The spec is ambiguous here [1][2]; this change aligns Chrome's behavior with Firefox. [1] https://github.com/w3c/IndexedDB/issues/78 [2] https://github.com/w3c/IndexedDB/issues/79 R=palakj@chromium.org,cmumford@chromium.org BUG=617963 Committed: https://crrev.com/dd17e5bea9d450f71441c2c8694d910ddfc9df1a Cr-Commit-Position: refs/heads/master@{#404536}

Patch Set 1 #

Total comments: 8

Patch Set 2 : One more test case #

Total comments: 2

Patch Set 3 : Rebased, made delete lists contain unique_ptrs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+214 lines, -72 lines) Patch
M content/browser/indexed_db/indexed_db_database.h View 1 2 2 chunks +31 lines, -1 line 0 comments Download
M content/browser/indexed_db/indexed_db_database.cc View 1 2 8 chunks +58 lines, -17 lines 0 comments Download
M third_party/WebKit/LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-expected.txt View 1 chunk +9 lines, -10 lines 0 comments Download
M third_party/WebKit/LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-expected.txt View 2 chunks +7 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-expected.txt View 2 chunks +7 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers-expected.txt View 2 chunks +7 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/storage/indexeddb/empty-transaction-order.html View 1 1 chunk +0 lines, -11 lines 0 comments Download
M third_party/WebKit/LayoutTests/storage/indexeddb/resources/delete-in-upgradeneeded-close-in-open-success.js View 3 chunks +3 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/storage/indexeddb/resources/delete-in-upgradeneeded-close-in-versionchange.js View 2 chunks +12 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/storage/indexeddb/resources/deletedatabase-delayed-by-open-and-versionchange.js View 2 chunks +1 line, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/storage/indexeddb/resources/testharness-helpers.js View 1 1 chunk +15 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/storage/indexeddb/upgrade-delete-versionchange.html View 1 chunk +39 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/storage/indexeddb/upgrade-multiple-deletes.html View 1 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (6 generated)
jsbell
palakj@ - can you please take a look? Thanks!
4 years, 6 months ago (2016-06-22 22:45:34 UTC) #1
cmumford
https://codereview.chromium.org/2084053004/diff/1/content/browser/indexed_db/indexed_db_database.cc File content/browser/indexed_db/indexed_db_database.cc (right): https://codereview.chromium.org/2084053004/diff/1/content/browser/indexed_db/indexed_db_database.cc#newcode1714 content/browser/indexed_db/indexed_db_database.cc:1714: return IsUpgradePendingOrRunning() || !blocked_delete_calls_.empty(); nit: blocked_delete_calls_.empty() is constant time ...
4 years, 6 months ago (2016-06-23 21:44:20 UTC) #2
jsbell
https://codereview.chromium.org/2084053004/diff/1/content/browser/indexed_db/indexed_db_database.cc File content/browser/indexed_db/indexed_db_database.cc (right): https://codereview.chromium.org/2084053004/diff/1/content/browser/indexed_db/indexed_db_database.cc#newcode1714 content/browser/indexed_db/indexed_db_database.cc:1714: return IsUpgradePendingOrRunning() || !blocked_delete_calls_.empty(); IsUpgradePendingOrRunning() should be constant time ...
4 years, 6 months ago (2016-06-23 22:26:50 UTC) #3
jsbell
https://codereview.chromium.org/2084053004/diff/1/content/browser/indexed_db/indexed_db_database.h File content/browser/indexed_db/indexed_db_database.h (right): https://codereview.chromium.org/2084053004/diff/1/content/browser/indexed_db/indexed_db_database.h#newcode341 content/browser/indexed_db/indexed_db_database.h:341: PendingDeleteCallList blocked_delete_calls_; On 2016/06/23 22:26:50, jsbell wrote: > On ...
4 years, 6 months ago (2016-06-23 23:00:27 UTC) #4
palakj1
On 2016/06/22 at 22:45:34, jsbell wrote: > palakj@ - can you please take a look? ...
4 years, 6 months ago (2016-06-24 03:32:52 UTC) #5
palakj1
https://codereview.chromium.org/2084053004/diff/1/content/browser/indexed_db/indexed_db_database.h File content/browser/indexed_db/indexed_db_database.h (right): https://codereview.chromium.org/2084053004/diff/1/content/browser/indexed_db/indexed_db_database.h#newcode341 content/browser/indexed_db/indexed_db_database.h:341: PendingDeleteCallList blocked_delete_calls_; nit: the names pending_delete_calls_ and blocked_delete_calls_ are ...
4 years, 6 months ago (2016-06-24 03:41:41 UTC) #7
cmumford
lgtm
4 years, 6 months ago (2016-06-24 16:15:01 UTC) #8
jsbell
On 2016/06/24 03:32:52, palakj1 wrote: > Is it a spec rule that pending delete calls ...
4 years, 6 months ago (2016-06-24 20:48:42 UTC) #9
palakj1
lgtm https://codereview.chromium.org/2084053004/diff/20001/third_party/WebKit/LayoutTests/storage/indexeddb/empty-transaction-order.html File third_party/WebKit/LayoutTests/storage/indexeddb/empty-transaction-order.html (left): https://codereview.chromium.org/2084053004/diff/20001/third_party/WebKit/LayoutTests/storage/indexeddb/empty-transaction-order.html#oldcode8 third_party/WebKit/LayoutTests/storage/indexeddb/empty-transaction-order.html:8: function expect(t, expected) { why this test here?
4 years, 6 months ago (2016-06-24 21:36:19 UTC) #10
jsbell
https://codereview.chromium.org/2084053004/diff/20001/third_party/WebKit/LayoutTests/storage/indexeddb/empty-transaction-order.html File third_party/WebKit/LayoutTests/storage/indexeddb/empty-transaction-order.html (left): https://codereview.chromium.org/2084053004/diff/20001/third_party/WebKit/LayoutTests/storage/indexeddb/empty-transaction-order.html#oldcode8 third_party/WebKit/LayoutTests/storage/indexeddb/empty-transaction-order.html:8: function expect(t, expected) { On 2016/06/24 21:36:19, palakj1 wrote: ...
4 years, 6 months ago (2016-06-24 21:37:28 UTC) #11
palakj
lgtm
4 years, 5 months ago (2016-06-28 22:20:36 UTC) #12
jsbell
FYI, after talking w/ other implementers, there's probably additional work to do here sequencing opens/deletes ...
4 years, 5 months ago (2016-07-07 17:13:39 UTC) #13
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/2084053004/40001
4 years, 5 months ago (2016-07-08 22:34:24 UTC) #17
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 5 months ago (2016-07-08 23:50:25 UTC) #19
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-08 23:50:39 UTC) #20
commit-bot: I haz the power
4 years, 5 months ago (2016-07-08 23:52:17 UTC) #22
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/dd17e5bea9d450f71441c2c8694d910ddfc9df1a
Cr-Commit-Position: refs/heads/master@{#404536}

Powered by Google App Engine
This is Rietveld 408576698