Re: [Bug 11270] New: Interaction between in-line keys and key generators

On Fri, Nov 12, 2010 at 12:36 AM, Jeremy Orlow <jorlow@chromium.org> wrote:
> On Fri, Nov 12, 2010 at 11:27 AM, Keean Schupke <keean@fry-it.com> wrote:
>>
>> You can do it in SQL because tables that hold a reference to an ID can
>> declare the reference in the schema. I guess without the meta-data to do
>> this it cannot be done.
>
> Even in SQL, I'd be very hesitant to do this.
>
>>
>> Why not get the auto-increment to wrap and skip collisions? What about
>> signed numbers?
>
> Exactly.  If we're going to support this, let's keep it super simple.  As
> Jonas mentioned, it's very unlikely that anyone would hit the 64bit limit in
> legitimate usage, so it's not worth trying to gracefully handle such a
> situation and adding a lot of surface area.

Indeed. I'd prefer to fail fatally to trying to do something
complicated and clever here. I'd be surprised if anyone ever ran into
this issue unintentionally (i.e. when not explicitly testing to see
what happens).

One way to look at it is that before we run into 2^64 limit, we'll run
into the limit that javascript can't represent all integers above
2^53. So once IDs get above that you basically won't be able to use
the object store anyway.

/ Jonas

Received on Friday, 12 November 2010 19:10:20 UTC