Subject | Re: [firebird-support] Concurrent updates fail |
---|---|
Author | Helen Borrie |
Post date | 2003-09-20T12:41:32Z |
At 06:01 PM 20/09/2003 +0530, you wrote:
<mailto:firebird-java-subscribe@yahoogroups.com>
and browse the Jaybird FAQ at www.ibphoenix.com
heLen
>I am trying a simple concurrent update which is not performing the wayRead up the IB 6 beta help on transaction settings. You didn't mention them so perhaps you aren't aware of them.
>say Oracle is in the same situation.
>
>The settings are:
>Firebird ver 1.5 rc3 running on Win 2K pro
>Using the JBird 1.0.1 driver available on sourceforge.net
>The scenario is as follows:Firebird allows it, of course. What you are possibly looking for is Read Committed, Record Version, Wait *without* autocommit. But the question of whether and how JBird implements all available isolation levels, lock settings and wait conditions you will need to ask in the firebird-java list
>User A : 'Update temptable set idd=11 where name ='bar'
>Executes
>
>User B : 'Update temptable set idd=12 where name ='bar'
>Executes
>
>B waits for A to finish.
>
>When A does commit B gets exception. Now B has a try except loop that
>retries the same query but the exception repeats.
>
>Here lies the problem ... I want that B should be permitted no matter
>what happenned to what A did. B changed record later in time and must be
>allowed (that is my business logic). However if B tries the same
>statement again he again gets the same exception untill I do a rollback
>or commit. The problem is that B is doing this update as a part of a
>larger transaction and my control is lost here if I commit or rollback.
>
>Oracle for example allows me to do this ... coz the context has changed.
>After the commit by A, B is now in a different transaction and should be
>allowed the update. B does not even need to know whether anyone else has
>altered the record. His changes have to be accepted. That is the
>business logic requirement.
>
>Is this a problem with Firebird or the driver ? Does Firebird allow this
>or do I need a different driver or are there some parameters on client
>side that I am getting wrong.
<mailto:firebird-java-subscribe@yahoogroups.com>
and browse the Jaybird FAQ at www.ibphoenix.com
heLen