db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject RE: IDBroker giving duplicate keys
Date Fri, 20 May 2005 06:30:53 GMT




Hi,

I am not lucky with preventing duplicate bugs in IdBroker by
synchronisation, because I am not sure whether this works in distributed
environments (several clients accessing the same database). But I am not
sure about this, I did not look into the code to see whether IdBroker is
supposed to work in distributed environments at all.

So I would like to find out how the duplicate ids can happen before I apply
any patch. However, if you do not use more than one client, synchronizing
the method should be fine.

      Thomas



David Ware <david@reeltwo.com> schrieb am 20.05.2005 03:10:27:

> Hi,
>
> I've been having problems with IDBroker giving duplicate keys in long
> running transactions.  To make sure I made a stress test situation where
> in a loop I'd simply create a new row object and save it.  With a loop
> size of 200000 this would usually result in the error occuring.  Using
> P6Spy I verified that it was trying to insert the same ID on 2 different
> objects sequentially.
> Here's an some info I got from spy.log from the last time I ran it, this
> shows the last 2 times ID_TABLE was accessed/changed, and which ID was
> duplicated:
>
>     ID_TABLE updates: QUANTITY = 39496
>                                       NEXT_ID = 62913
>     primary key of next insert : 23417
>     ...
>     ...
>     ID_TABLE updates: QUANTITY = 39496
>                                       NEXT_ID = 102409
>     primary key of next insert : 28676
>     ...
>     ...
>     attempts to insert primary key 62912 twice.
>
> This is using hypersonic database.  This seems to be solved by
> synchronizing the 'storeIDs' method of IDBroker as suggested in issue
> TRQS296.
>
> David Ware
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message