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

Scott Hess shess at google.com
Fri Oct 12 12:06:36 PDT 2007


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



More information about the whatwg mailing list