.
contact contact

Modified lock handling during transactions

 
.
  A.06.30 Release Notes
When using database locks and transactions an unlock is now delayed until the database transaction is finished (either committed or rolled back). This makes it easier to adopt database transactions with existing software and avoids possible interactions between transactions and database locks by applications which may result in a deadlock.

The following example demonstrates this:

  ! Begin transaction
  DBBEGIN("",1,S(*))
  ...
  ! Write-Lock customer 12345
  PREDICATE Q$ FROM "CUSTOMER","CUSTNO","=",12345
  DBLOCK(Db$,Q$,6,S(*))
  ...
  ! Update customer record
  DBUPDATE(Db$,"CUSTOMER",1,S(*),"@",Buf$)
  ...
  ! Unlock customer. The lock is not freed until the transaction completes.
  DBUNLOCK(Db$,"",1,S(*))
  ...
  ! This will also release freed locks
  DBCOMMIT(1,S(*))
  ...

With previous Eloquence versions database locks were independend from transactions. This could lead to a situation where a record is locked by a transaction (because it was modified in a transaction) and another user aquires a lock and then tries to update the same record.

The lock status is marked as "PENDING" in the http status display and dbctl output.


 
 
.
 
 
  Privacy | Webmaster | Terms of use | Impressum Revision:  2002-11-18  
  Copyright © 1995-2002 Marxmeier Software AG