Re: Question about SERIALIZE transaction isolation
Date: Wed, 17 Jun 2009 15:15:06 GMT
Message-ID: <_L7_l.2965$u86.2831_at_nwrddc01.gnilink.net>
"Roy Hann" <specially_at_processed.almost.meat> wrote in message
news:ef6dncCufqMTcqXXnZ2dnUVZ8k6dnZ2d_at_pipex.net...
> Christoph Rupp wrote:
>
>> Hi,
>>
>> i'm nearly ready for my first release of my new concurrent, multi-
>> threaded, ACID transactional, logical idempotent logging, lock-free
>> database engine (key/value storage).
>>
>> OK, enough buzzwords for today :)
>>
>> Some of you were kind enough to help me a couple of times with my
>> questions. This one is about the behaviour of a read-only transaction
>> in the SERIALIZE isolation level.
>>
>> TXN A:
>> BEGIN
>> INSERT (a, b)
>>
>> TXN B:
>> BEGIN
>> FIND (a)
>>
>> Does the lookup of an un-committed item return KEY_NOT_FOUND or does
>> it create a transaction conflict?
>
> The key shouldn't be found in transaction B, and to maintain
> serializable isolation it should never be found even by a future query
> in the same transaction. I have no idea what a "transaction conflict"
> is but it sounds like an error. The point of serializable isolation is
> to create a realistic illusion that you have the database for your
> sole use. Random errors caused by the actions of other users would
> spoil that illusion. If you don't want to wait, you'll have to keep
> track of key values that are added while transaction B is in progress so
> you can make sure you exclude them from the results of that transaction.
>
> --
> Roy
>
Cristoph,