W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2007

[whatwg] database full error (was: Re: executeSql API is synchronous)

From: Scott Hess <shess@google.com>
Date: Fri, 12 Oct 2007 12:06:36 -0700
Message-ID: <696e4b7c0710121206o35412f62xd57af5ff71229c8@mail.gmail.com>
On 10/12/07, Anne van Kesteren <annevk at opera.com> wrote:
> On Fri, 12 Oct 2007 20:46:52 +0200, Ian Hickson <ian at hixie.ch> wrote:
> > Certainly that would be reasonable. I have added it. People should let me
> > know if they want me to remove or add error codes, by the way.
>
> I think there should be an error code for the database being full. For
> some platforms there's not much storage space available and knowing
> whether or not there's some space left is useful. So you can decide to
> only store the critical data for instance.

My counter-argument to this is that by the time you get the "database
is full" error, you're probably already sunk.  Most likely there won't
be anywhere to store the critical data, either.  Assuming your
database has transactional semantics, you may not be able to delete
any data, because it will need more space while implementing the
delete.  You MAY be able to delete an entire database, except that
there's currently no API to do that, and on some platforms even that
may be challenging (on some systems, anyone with an open connection to
the database will likely prevent deletion.  On others, anyone with an
open connection will likely prevent reclaiming of the deleted space).

I think what you're really asking for, above, is a means of saying
"How much data can I store?", so that you can make decisions about
what to store.  In the limit, that's hard for the browser to
guarantee, of course.

-scott
Received on Friday, 12 October 2007 12:06:36 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:37 UTC