31.08.2018 22:23, Gabor Boros wrote:
Hi All,

Now (with 4.0.0.1190) works with one (ISQL) client but got "update conflicts with concurrent update" immediately with two or more clients.

  This is because i fixed handling of request snapshot in autonomous 
transactions.
Thank to your message.

2018. 08. 23. 17:22 keltezéssel, Gabor Boros írta:
Hi All,

I tried Thomas' test case (see the link below) with the actual snapshot of 4.0 (4.0.0.1170 SS Win32) and got the next error instantly with one ISQL session. No problem with multiple (5) ISQL sessions if set ReadConsistency to 0. Why the engine not wait for concurrent transactions? I am missed something or is it a bug?

"Statement failed, SQLSTATE = 40001
update conflicts with concurrent update
-concurrent transaction number is 3626
-At procedure 'P_INCREMENT' line: 11, col: 7"

https://groups.yahoo.com/neo/groups/firebird-support/conversations/messages/128920

  Engine actually does wait for concurrent transaction, but in read consistency 
mode
it will not see new data until request snapshot is the same. This is why we 
introduced
request restart at top-level statement. Unfortunately, there is two issues with 
part of
request running in autonomous transaction:
a) it is not start own snapshot, and
b) it is not restarted when update conflict happens

  Issue (a) is fixed now (see above) but issue (b) is hard to fix and i need 
some time
to find if it can be fixed and how to do it. Probably, it should not be fixed
at all (hi, Adriano ;)). I going to try this test with execute statement, just 
to
see what happens.

Regards,
Vlad

PS In ReadConsistency = 0 mode test case produced a lot of backversions of 
single record
that was updated many times. It happens because "main" transaction blocks 
garbage
collection.
In ReadConsistency = 1 (after i added retry on update conflict handling at 
P-SQL level)
it produces just 2 backversions - thanks to the intermediate garbage collection.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to