Subject | read only deadlocks |
---|---|
Author | imoffskating |
Post date | 2005-09-02T15:56:39Z |
Hello,
We are running Firebird 1.5.2 SS on linux with jaybird jdbc.
We are writing a program that incorporates a money transfer system.
The money is "transferred" between tables by the main program. The
transfer is within a transaction (i.e. 2 updates - deduct some money
from one table, increase money in other table).
Our transaction isolation is set to read_committed.
Another program needs to take a snapshot of all committed transactions
at one time to make sure all the money "adds up" and no money has gone
"missing" by our faulty code etc.
As far as we understand this checking program should be in
serializable mode, read only and function correctly.
What we've found is the check program gets a GDS deadlock exception
which we thought would not happen as serializable uses a snapshot of
the db.
Does anyone have any advice on how to properly set up our isolation
level correctly for the check program to work without deadlocks and
only see data committed at its start time?
Many thanks,
alex.
We are running Firebird 1.5.2 SS on linux with jaybird jdbc.
We are writing a program that incorporates a money transfer system.
The money is "transferred" between tables by the main program. The
transfer is within a transaction (i.e. 2 updates - deduct some money
from one table, increase money in other table).
Our transaction isolation is set to read_committed.
Another program needs to take a snapshot of all committed transactions
at one time to make sure all the money "adds up" and no money has gone
"missing" by our faulty code etc.
As far as we understand this checking program should be in
serializable mode, read only and function correctly.
What we've found is the check program gets a GDS deadlock exception
which we thought would not happen as serializable uses a snapshot of
the db.
Does anyone have any advice on how to properly set up our isolation
level correctly for the check program to work without deadlocks and
only see data committed at its start time?
Many thanks,
alex.