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

Issue 13946004: FileAPI: Run database recovery on IOError. (Closed)

Created:
7 years, 8 months ago by tzik
Modified:
7 years, 8 months ago
Reviewers:
kinuko, ericu
CC:
chromium-reviews, tzik+watch_chromium.org, kinuko+watch, darin-cc_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

FileAPI: Run database recovery on IOError. In this case, the databases was actually corrupted but the database classes did not try to repair. After this CL lands, these corruption should be repaired correctly. TEST="content_unittests: FileSystemDirectoryDatabaseTest.TestRepairDatabase_MissingManifest & FileSystemOriginDatabaseTest.DatabaseRecoveryForMissingManifestTest" BUG=229773 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193380

Patch Set 1 #

Patch Set 2 : +test #

Total comments: 12

Patch Set 3 : simplify test helper #

Total comments: 1

Patch Set 4 : +comment, +test for other db files #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -2 lines) Patch
M webkit/fileapi/file_system_database_test_helper.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M webkit/fileapi/file_system_database_test_helper.cc View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download
M webkit/fileapi/file_system_directory_database.cc View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M webkit/fileapi/file_system_directory_database_unittest.cc View 1 1 chunk +23 lines, -0 lines 0 comments Download
M webkit/fileapi/file_system_origin_database.cc View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M webkit/fileapi/file_system_origin_database_unittest.cc View 1 2 3 1 chunk +45 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
tzik
PTAL
7 years, 8 months ago (2013-04-10 06:08:48 UTC) #1
kinuko
https://codereview.chromium.org/13946004/diff/2001/webkit/fileapi/file_system_database_test_helper.cc File webkit/fileapi/file_system_database_test_helper.cc (right): https://codereview.chromium.org/13946004/diff/2001/webkit/fileapi/file_system_database_test_helper.cc#newcode99 webkit/fileapi/file_system_database_test_helper.cc:99: picked_file_number = number; Maybe we could just delete all ...
7 years, 8 months ago (2013-04-10 06:23:49 UTC) #2
tzik
https://codereview.chromium.org/13946004/diff/2001/webkit/fileapi/file_system_database_test_helper.cc File webkit/fileapi/file_system_database_test_helper.cc (right): https://codereview.chromium.org/13946004/diff/2001/webkit/fileapi/file_system_database_test_helper.cc#newcode99 webkit/fileapi/file_system_database_test_helper.cc:99: picked_file_number = number; On 2013/04/10 06:23:49, kinuko wrote: > ...
7 years, 8 months ago (2013-04-10 06:49:20 UTC) #3
kinuko
looking good https://codereview.chromium.org/13946004/diff/2001/webkit/fileapi/file_system_directory_database.cc File webkit/fileapi/file_system_directory_database.cc (right): https://codereview.chromium.org/13946004/diff/2001/webkit/fileapi/file_system_directory_database.cc#newcode717 webkit/fileapi/file_system_directory_database.cc:717: if (!status.IsCorruption() && !status.IsIOError()) On 2013/04/10 06:49:20, ...
7 years, 8 months ago (2013-04-10 08:41:16 UTC) #4
tzik
https://codereview.chromium.org/13946004/diff/2001/webkit/fileapi/file_system_directory_database.cc File webkit/fileapi/file_system_directory_database.cc (right): https://codereview.chromium.org/13946004/diff/2001/webkit/fileapi/file_system_directory_database.cc#newcode717 webkit/fileapi/file_system_directory_database.cc:717: if (!status.IsCorruption() && !status.IsIOError()) On 2013/04/10 08:41:17, kinuko wrote: ...
7 years, 8 months ago (2013-04-10 10:59:49 UTC) #5
kinuko
lgtm https://codereview.chromium.org/13946004/diff/2001/webkit/fileapi/file_system_directory_database_unittest.cc File webkit/fileapi/file_system_directory_database_unittest.cc (right): https://codereview.chromium.org/13946004/diff/2001/webkit/fileapi/file_system_directory_database_unittest.cc#newcode664 webkit/fileapi/file_system_directory_database_unittest.cc:664: DeleteDatabaseFile(kDatabaseDirectory, leveldb::kDescriptorFile); On 2013/04/10 10:59:49, tzik wrote: > ...
7 years, 8 months ago (2013-04-10 11:02:13 UTC) #6
tzik
Thanks! https://codereview.chromium.org/13946004/diff/2001/webkit/fileapi/file_system_directory_database_unittest.cc File webkit/fileapi/file_system_directory_database_unittest.cc (right): https://codereview.chromium.org/13946004/diff/2001/webkit/fileapi/file_system_directory_database_unittest.cc#newcode664 webkit/fileapi/file_system_directory_database_unittest.cc:664: DeleteDatabaseFile(kDatabaseDirectory, leveldb::kDescriptorFile); On 2013/04/10 11:02:13, kinuko wrote: > ...
7 years, 8 months ago (2013-04-10 13:01:09 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tzik@chromium.org/13946004/15001
7 years, 8 months ago (2013-04-10 13:01:25 UTC) #8
commit-bot: I haz the power
Change committed as 193380
7 years, 8 months ago (2013-04-10 14:09:52 UTC) #9
ericu
7 years, 8 months ago (2013-04-10 21:39:11 UTC) #10
Message was sent while issue was closed.
Awesome--thanks for handling this!

Powered by Google App Engine
This is Rietveld 408576698