New issue
Advanced search Search tips

Issue 645018 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

IndexedDB: incorrect object store and index metadata immediately after IDBTransaction.abort() returns

Project Member Reported by pwnall@chromium.org, Sep 8 2016

Issue description

We don't correctly revert the metadata in object store and index handles correctly in IDBTransaction.abort(). The metadata is eventually reverted after the transaction is completely aborted.

I will upload a CL with a Web Platform test that observes the incorrect metadata, and I plan to fix these issues while refactoring metadata reverting when a transaction is aborted.
 

Comment 2 Deleted

Components: Blink>Storage>IndexedDB
Labels: OS-All
(mostly) failing tests:
https://codereview.chromium.org/2314933005/diff/20001/third_party/WebKit/LayoutTests/storage/indexeddb/abort-metadata-revert.html
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 24 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b00bdc1d42f5ec166b3ab1643e6993a30e593a8c

commit b00bdc1d42f5ec166b3ab1643e6993a30e593a8c
Author: pwnall <pwnall@chromium.org>
Date: Sat Sep 24 01:23:54 2016

Minor IndexedDB refactorings.

This is an extraction of all the refactoring in http://crrev.com/2314933005
so that CL can focus on changing the metadata representation and on
fixing the metadata reverting on transaction abort.

BUG= 645018 

Review-Url: https://codereview.chromium.org/2349413002
Cr-Commit-Position: refs/heads/master@{#420806}

[modify] https://crrev.com/b00bdc1d42f5ec166b3ab1643e6993a30e593a8c/third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp
[modify] https://crrev.com/b00bdc1d42f5ec166b3ab1643e6993a30e593a8c/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
[modify] https://crrev.com/b00bdc1d42f5ec166b3ab1643e6993a30e593a8c/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h
[modify] https://crrev.com/b00bdc1d42f5ec166b3ab1643e6993a30e593a8c/third_party/WebKit/Source/modules/indexeddb/IDBIndex.cpp
[modify] https://crrev.com/b00bdc1d42f5ec166b3ab1643e6993a30e593a8c/third_party/WebKit/Source/modules/indexeddb/IDBIndex.h
[modify] https://crrev.com/b00bdc1d42f5ec166b3ab1643e6993a30e593a8c/third_party/WebKit/Source/modules/indexeddb/IDBMetadata.cpp
[modify] https://crrev.com/b00bdc1d42f5ec166b3ab1643e6993a30e593a8c/third_party/WebKit/Source/modules/indexeddb/IDBMetadata.h
[modify] https://crrev.com/b00bdc1d42f5ec166b3ab1643e6993a30e593a8c/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp
[modify] https://crrev.com/b00bdc1d42f5ec166b3ab1643e6993a30e593a8c/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.h
[modify] https://crrev.com/b00bdc1d42f5ec166b3ab1643e6993a30e593a8c/third_party/WebKit/Source/modules/indexeddb/IDBOpenDBRequest.cpp
[modify] https://crrev.com/b00bdc1d42f5ec166b3ab1643e6993a30e593a8c/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp
[modify] https://crrev.com/b00bdc1d42f5ec166b3ab1643e6993a30e593a8c/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp
[modify] https://crrev.com/b00bdc1d42f5ec166b3ab1643e6993a30e593a8c/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.h
[modify] https://crrev.com/b00bdc1d42f5ec166b3ab1643e6993a30e593a8c/third_party/WebKit/Source/modules/indexeddb/IDBTransactionTest.cpp
[modify] https://crrev.com/b00bdc1d42f5ec166b3ab1643e6993a30e593a8c/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp

Project Member

Comment 5 by bugdroid1@chromium.org, Oct 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3572fef3913166c5da29dca38c04bf6f6683560d

commit 3572fef3913166c5da29dca38c04bf6f6683560d
Author: pwnall <pwnall@chromium.org>
Date: Thu Oct 06 23:44:01 2016

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 

Review-Url: https://codereview.chromium.org/2314933005
Cr-Commit-Position: refs/heads/master@{#423742}

[add] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/LayoutTests/storage/indexeddb/rename-index-abort.html
[add] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/LayoutTests/storage/indexeddb/rename-object-store-abort.html
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/LayoutTests/storage/indexeddb/resources/rename-common.js
[add] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/LayoutTests/storage/indexeddb/transaction-abort-generator-revert.html
[add] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/LayoutTests/storage/indexeddb/transaction-abort-index-metadata-revert.html
[add] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/LayoutTests/storage/indexeddb/transaction-abort-multiple-metadata-revert.html
[add] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/LayoutTests/storage/indexeddb/transaction-abort-object-store-metadata-revert.html
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBIndex.cpp
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBIndex.h
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBMetadata.cpp
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBMetadata.h
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.h
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBOpenDBRequest.cpp
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.h
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp

Status: Fixed (was: Assigned)
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 27 2016

Labels: merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3572fef3913166c5da29dca38c04bf6f6683560d

commit 3572fef3913166c5da29dca38c04bf6f6683560d
Author: pwnall <pwnall@chromium.org>
Date: Thu Oct 06 23:44:01 2016

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 

Review-Url: https://codereview.chromium.org/2314933005
Cr-Commit-Position: refs/heads/master@{#423742}

[add] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/LayoutTests/storage/indexeddb/rename-index-abort.html
[add] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/LayoutTests/storage/indexeddb/rename-object-store-abort.html
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/LayoutTests/storage/indexeddb/resources/rename-common.js
[add] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/LayoutTests/storage/indexeddb/transaction-abort-generator-revert.html
[add] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/LayoutTests/storage/indexeddb/transaction-abort-index-metadata-revert.html
[add] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/LayoutTests/storage/indexeddb/transaction-abort-multiple-metadata-revert.html
[add] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/LayoutTests/storage/indexeddb/transaction-abort-object-store-metadata-revert.html
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBIndex.cpp
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBIndex.h
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBMetadata.cpp
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBMetadata.h
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.h
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBOpenDBRequest.cpp
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.h
[modify] https://crrev.com/3572fef3913166c5da29dca38c04bf6f6683560d/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp

Comment 8 by dimu@google.com, Nov 4 2016

Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840

Sign in to add a comment