Bug 110675

Summary: IndexedDB: IO error when checking schema should destroy LevelDB directory
Product: WebKit Reporter: David Grogan <dgrogan>
Component: New BugsAssignee: David Grogan <dgrogan>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, alecflett, jsbell, ojan, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 110677, 110820    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

David Grogan
Reported 2013-02-22 18:10:43 PST
IndexedDB: IO error when checking schema should destroy LevelDB directory
Attachments
Patch (2.14 KB, patch)
2013-02-22 18:12 PST, David Grogan
no flags
Patch (2.14 KB, patch)
2013-02-22 19:45 PST, David Grogan
no flags
Patch (14.07 KB, patch)
2013-02-25 20:33 PST, David Grogan
no flags
Patch (13.56 KB, patch)
2013-02-27 11:51 PST, David Grogan
no flags
David Grogan
Comment 1 2013-02-22 18:12:30 PST
David Grogan
Comment 2 2013-02-22 18:17:14 PST
Josh, could you take a look at this?
David Grogan
Comment 3 2013-02-22 18:35:29 PST
Josh or Alec, could you take a look? IO error on schema check and failed openInMemory were the last two situations caught by the fallthrough that is now histogrammed as UnknownErr.
David Grogan
Comment 4 2013-02-22 18:43:29 PST
Oops, comment 3 was supposed to go on bug 110677.
Joshua Bell
Comment 5 2013-02-22 19:36:38 PST
Comment on attachment 189887 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=189887&action=review lgtm > Source/WebCore/Modules/indexeddb/IDBBackingStore.cpp:391 > + if (ok && !known) { Maybe more concise as: } else if (!known) { (Not sure that's an improvement.)
David Grogan
Comment 6 2013-02-22 19:45:10 PST
Comment on attachment 189887 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=189887&action=review >> Source/WebCore/Modules/indexeddb/IDBBackingStore.cpp:391 >> + if (ok && !known) { > > Maybe more concise as: > > } else if (!known) { > > (Not sure that's an improvement.) Done.
David Grogan
Comment 7 2013-02-22 19:45:32 PST
David Grogan
Comment 8 2013-02-22 19:46:18 PST
Tony, could you review this?
Tony Chang
Comment 9 2013-02-25 09:46:43 PST
Comment on attachment 189900 [details] Patch I thought we had a unittest that truncates the level db data file. Maybe something like that would work for this case?
David Grogan
Comment 10 2013-02-25 20:33:16 PST
David Grogan
Comment 11 2013-02-25 20:36:33 PST
Comment on attachment 190194 [details] Patch Now with a unit test after some refactoring. Josh and/or Tony, could you review the new stuff?
Joshua Bell
Comment 12 2013-02-27 11:33:47 PST
Comment on attachment 190194 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=190194&action=review lgtm - nice work! > Source/WebCore/ChangeLog:14 > + (DefaultLevelDBFactory): Add details or remove these lines in (). > Source/WebKit/chromium/ChangeLog:13 > + (WebCore): Ditto.
David Grogan
Comment 13 2013-02-27 11:51:24 PST
David Grogan
Comment 14 2013-02-27 11:52:24 PST
Tony, could you re-review this?
David Grogan
Comment 15 2013-02-27 12:07:54 PST
Ojan, with Tony out of town could you review this? Tony r+'d a much smaller earlier version and Josh gave this an LGTM.
David Grogan
Comment 16 2013-02-27 13:58:56 PST
Adam, with Tony and Ojan out, could you review this patch? Tony r+'d a much smaller earlier version and Josh gave this an LGTM.
Adam Barth
Comment 17 2013-02-28 00:37:29 PST
Comment on attachment 190568 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=190568&action=review I'm not sure about the GYP cargo culting, but the rest looks sane. > Source/WebKit/chromium/ChangeLog:9 > + This was cargo-culted. The component build wouldn't run otherwise. :) > Source/WebKit/chromium/WebKit.gyp:646 > + 'tests/IDBCleanupOnIOErrorTest.cpp', ugg
WebKit Review Bot
Comment 18 2013-02-28 10:13:18 PST
Comment on attachment 190568 [details] Patch Clearing flags on attachment: 190568 Committed r144323: <http://trac.webkit.org/changeset/144323>
WebKit Review Bot
Comment 19 2013-02-28 10:13:23 PST
All reviewed patches have been landed. Closing bug.
Tony Chang
Comment 20 2013-03-04 11:41:28 PST
Comment on attachment 190568 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=190568&action=review > Source/WebKit/chromium/tests/IDBCleanupOnIOErrorTest.cpp:31 > +#include <webkit/support/webkit_support.h> To avoid the gyp cargo culting, you would need to not include this header. I guess that means either porting CreateScopedTempDirectory to Source/WebKit/chromium/testing/ or moving this test into chromium's repo. Anyway, not a big deal either way.
Note You need to log in before you can comment on or make changes to this bug.