W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2013

Re: [IndexedDB] Inform script of corruption recovery

From: David Grogan <dgrogan@chromium.org>
Date: Tue, 12 Feb 2013 13:49:05 -0800
Message-ID: <CAOZbSt3oxCCZdq+b2P=yGjUA4mbPV+Qd91EX8E68P62R7WhiFQ@mail.gmail.com>
To: Kyle Huey <me@kylehuey.com>
Cc: "public-webapps@w3.org" <public-webapps@w3.org>
On Mon, Feb 11, 2013 at 2:55 PM, Kyle Huey <me@kylehuey.com> wrote:

> On Mon, Feb 11, 2013 at 10:40 PM, David Grogan <dgrogan@chromium.org>wrote:
>
>> When chrome opens an IDB database, it attempts to detect corruption. If
>> the database appears to have been corrupted, either via software bug or
>> hardware fault, chrome performs "recovery." As currently implemented (we
>> may try to do something more surgical in the future), "recovery"
>> means removing all the origin's databases from disk and creating a new
>> empty database. It would be useful to alert script that some data has been
>> lost in this situation. The web app could then alert the user or take other
>> appropriate action. This is important in offline editing scenarios, where
>> this represents true user data loss rather than just a flush of a data
>> cache.
>>
>
> Do you expect to ever be able to implement something more granular than a
> per-database recover or discard?  I would imagine that's as surgical as it
> is going to get.
>

We've talked about checkpointing, which would allow chrome to recover
everything except the last N commits.


> I think the answer to that question impacts how we design this.
>

I'm assuming you mean because a surgical recovery could leave the version
intact and make a new property on the upgradeneeded event inaccessible? In
that case we could also put the property on the success event that comes in
response to open().
Received on Tuesday, 12 February 2013 21:49:53 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:57 GMT