Subject | Re: [firebird-support] Re: Lock update for checkin/checkout? |
---|---|
Author | Helen Borrie |
Post date | 2004-02-04T13:24:57Z |
At 12:37 PM 4/02/2004 +0000, you wrote:
transaction has secured a pess. lock on the row, the SELECT transaction
won't be able to update *anything* on it. The SELECT transaction should be
read-only, otherwise it will hold up garbage collection.
If the second transaction's request for the lock succeeds,
purpose of doing the task.
Re the Dummy Update - yes, it's a hack, and putting an explicit lock on a
cursor is less of a hack - but any pessimistic locking in Firebird is
inherently hackish. If you do want to go the cursor route, you can use the
API functions directly from C/C++ or using an API conversion for another
language. There is no DSQL command for declaring a named cursor.
/hb
>To summarize what I've learned so far:Now starts a new transaction which
>* the client (converter process) starts a transaction with READ
> COMITTED, selects a candidate row,
>tries to obtain a pessimisticNo, omit this step entirely. It is flaky. If the "operational"
> lock by doing an identity update on one of the columns with NO WAIT,
> and if it succeeds,
>* marks the column as 'in progress', and commits the transaction.
transaction has secured a pess. lock on the row, the SELECT transaction
won't be able to update *anything* on it. The SELECT transaction should be
read-only, otherwise it will hold up garbage collection.
If the second transaction's request for the lock succeeds,
>* It then converts the blob at its leasure, and updates the BLOB in aNo, the client updates the BLOB in the transaction it started for the
>* separate transaction when ready.
purpose of doing the task.
>Or could I just keep the first transaction open until the conversionLong transactions that tie up multiple records are death.
>is ready? That would make the 'mark in process' unnecesary, but I
>don't know how bad long transactions are.
Re the Dummy Update - yes, it's a hack, and putting an explicit lock on a
cursor is less of a hack - but any pessimistic locking in Firebird is
inherently hackish. If you do want to go the cursor route, you can use the
API functions directly from C/C++ or using an API conversion for another
language. There is no DSQL command for declaring a named cursor.
/hb