IndexedDB: Close backing store after a failed write
commit2f626ee3362fbda3404dc720c681afb8647f9323
authorjsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 31 Oct 2013 01:36:56 +0000 (31 01:36 +0000)
committerjsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 31 Oct 2013 01:36:56 +0000 (31 01:36 +0000)
treeaba7dad15783237eabb32091c01c88c2b0223ea9
parentc078461f8a6d45304f0edd5dacf10aa7074270e6
IndexedDB: Close backing store after a failed write

A failed write by leveldb can indicates either a transient I/O error by the foreground thread or that the background compaction thread has hit an error (I/O or corruption) which will make all future operations fail.

In lieu of being able to distinguish these for now, treat the write operation as fatal and force-close the backing store so that if the error was transient the store is not wedged until a browser restart. A well-behaved web app would be able to detect the close and re-open the connection.

BUG=251870

Review URL: https://codereview.chromium.org/48833005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231974 0039d316-1c4b-4281-b951-d872f2087c98
content/browser/indexed_db/indexed_db_backing_store.h
content/browser/indexed_db/indexed_db_context_impl.cc
content/browser/indexed_db/indexed_db_context_impl.h
content/browser/indexed_db/indexed_db_database.cc
content/browser/indexed_db/indexed_db_database.h
content/browser/indexed_db/indexed_db_database_unittest.cc
content/browser/indexed_db/indexed_db_factory.cc
content/browser/indexed_db/indexed_db_factory.h
content/browser/indexed_db/indexed_db_factory_unittest.cc
content/browser/indexed_db/indexed_db_transaction.cc
content/browser/indexed_db/indexed_db_unittest.cc