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/79R=palakj@chromium.org,cmumford@chromium.org
BUG=617963
Committed: https://crrev.com/dd17e5bea9d450f71441c2c8694d910ddfc9df1a
Cr-Commit-Position: refs/heads/master@{#404536}
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
https://codereview.chromium.org/2084053004/diff/1/content/browser/indexed_db/...
File content/browser/indexed_db/indexed_db_database.h (right):
https://codereview.chromium.org/2084053004/diff/1/content/browser/indexed_db/...
content/browser/indexed_db/indexed_db_database.h:341: PendingDeleteCallList
blocked_delete_calls_;
On 2016/06/23 22:26:50, jsbell wrote:
> On 2016/06/23 21:44:20, cmumford wrote:
> > Why do we use a std::list instead of std::queue?
>
> No good reason; probably ported mechanically from WebKit. I'll convert these
to
> queues.
Ah, I remember. you can't iterate over a std::queue, and we iterate over these
when sending out OnBlocked().
That isn't done for pending_delete_calls_ so we could switch that to be a queue.
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
On 2016/06/22 at 22:45:34, jsbell wrote:
> palakj@ - can you please take a look?
>
> Thanks!
Is it a spec rule that pending delete calls are handled before pending open
calls?
So, in case of
indexedDB.open(db)
indexedDB.open(db)
indexedDB.deleteDatabase(db)
we expect the sequence: open, delete, open.
Similarly, delete call registered at upgradeneeded is triggered first and then
delete call registered at success.
Is that the expected behaviour? Do we need to have a test to assert this order.
4 years, 6 months ago
(2016-06-24 16:15:01 UTC)
#8
lgtm
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
On 2016/06/24 03:32:52, palakj1 wrote:
> Is it a spec rule that pending delete calls are handled before pending open
> calls?
> So, in case of
> indexedDB.open(db)
> indexedDB.open(db)
> indexedDB.deleteDatabase(db)
>
> we expect the sequence: open, delete, open.
The spec does define behavior here (which chrome follows) but that's not
necessarily desired. We've discussed this in the past but pre-github.
I filed:
https://github.com/w3c/IndexedDB/issues/79
This is covered by storage/indexeddb/database-deletepending-flag.html:
> Similarly, delete call registered at upgradeneeded is triggered first and then
> delete call registered at success.
> Is that the expected behaviour? Do we need to have a test to assert this
order.
I'll add a test case for this.
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
4 years, 5 months ago
(2016-06-28 22:20:36 UTC)
#12
lgtm
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
FYI, after talking w/ other implementers, there's probably additional work to do
here sequencing opens/deletes to align implementations. (Thanks for pushing,
palak@!)
My plan is to land this (after rebasing) since it still seems like a worthwhile
intermediate step.
jsbell
Description was changed from ========== IndexedDB: Defer delete calls when there is a running upgrade ...
4 years, 5 months ago
(2016-07-08 22:22:02 UTC)
#14
Description was changed from
==========
IndexedDB: Defer delete calls when there is a running upgrade
The 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]; this change aligns Chrome's behavior
with Firefox.
[1] https://github.com/w3c/IndexedDB/issues/78R=palakj@chromium.org,cmumford@chromium.org
BUG=617963
==========
to
==========
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/79R=palakj@chromium.org,cmumford@chromium.org
BUG=617963
==========
jsbell
The CQ bit was checked by jsbell@chromium.org
4 years, 5 months ago
(2016-07-08 22:34:04 UTC)
#15
Description was changed from ========== IndexedDB: Defer delete calls when there is a running upgrade ...
4 years, 5 months ago
(2016-07-08 23:50:24 UTC)
#18
Message was sent while issue was closed.
Description was changed from
==========
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/79R=palakj@chromium.org,cmumford@chromium.org
BUG=617963
==========
to
==========
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/79R=palakj@chromium.org,cmumford@chromium.org
BUG=617963
==========
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 5 months ago
(2016-07-08 23:50:25 UTC)
#19
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago
(2016-07-08 23:50:39 UTC)
#20
Message was sent while issue was closed.
CQ bit was unchecked.
commit-bot: I haz the power
Description was changed from ========== IndexedDB: Defer delete calls when there is a running upgrade ...
4 years, 5 months ago
(2016-07-08 23:52:16 UTC)
#21
Message was sent while issue was closed.
Description was changed from
==========
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/79R=palakj@chromium.org,cmumford@chromium.org
BUG=617963
==========
to
==========
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/79R=palakj@chromium.org,cmumford@chromium.org
BUG=617963
Committed: https://crrev.com/dd17e5bea9d450f71441c2c8694d910ddfc9df1a
Cr-Commit-Position: refs/heads/master@{#404536}
==========
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/dd17e5bea9d450f71441c2c8694d910ddfc9df1a Cr-Commit-Position: refs/heads/master@{#404536}
4 years, 5 months ago
(2016-07-08 23:52:17 UTC)
#22
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: palakj, cmumford, palakj1
Base URL: https://chromium.googlesource.com/chromium/src.git@master
Comments: 10