Main Page | Report this Page
Computers Forum Index  »  Computer - Databases - Btrieve  »  Record vs page locking in V8 of Btrieve...
Page 1 of 1    

Record vs page locking in V8 of Btrieve...

Author Message
Brian Scoffield...
Posted: Thu Jun 04, 2009 5:15 am
Guest
We are encountering some unexplained and unexpected locking issues.

We have reviewed all our locking strategies and 'believe' they are
sound.

However we seem to get interfering locks when we access 2 records that
were created closely together in time and their keys are quite close
together in value.. If we try exactly the same sequence of events but
start with 2 records whose key values are slightly further apart we
can't create the locking issue.

It looks like we are not getting record locking, but rather something
like 'page' locking.

In V8 of Pervasive, should we be getting true record locking or is it
possible that a series of records is getting locked despite the fact
our programs are accessing only a single record?

The Btrieve table in question is in V8 format.

Brian Scoffield
 
BtrieveBill...
Posted: Mon Jun 08, 2009 8:42 pm
Guest
Pervasive does offer pure record locking, but inn some cases, you are
ALSO locking related index pages and other constructs.

For example, if you have a linked-duplicate index, it is also possible
to get a Status 84 on a database INSERT, which can occur if the LAST
record on the key path (the one with the NULL pointer at the end of the
linked list) is currently locked and the new record needs to be inserted
at the end of the record chain. This conflict occurs because the last
record needs to be updated with the new linked list pointer, so an
implicit lock is also generated.

If you are using linked-duplicate indices, try rebuilding your files
with repeating-duplicate indices instead & see if that helps...
Goldstar Software Inc.
Pervasive-based Products, Training & Services
Bill Bach
BillBach at (no spam) goldstarsoftware.com
http://www.goldstarsoftware.com
*** Pervasive Training - July 2009 in Chicago ***


Brian Scoffield wrote:
Quote:
We are encountering some unexplained and unexpected locking issues.

We have reviewed all our locking strategies and 'believe' they are
sound.

However we seem to get interfering locks when we access 2 records that
were created closely together in time and their keys are quite close
together in value.. If we try exactly the same sequence of events but
start with 2 records whose key values are slightly further apart we
can't create the locking issue.

It looks like we are not getting record locking, but rather something
like 'page' locking.

In V8 of Pervasive, should we be getting true record locking or is it
possible that a series of records is getting locked despite the fact
our programs are accessing only a single record?

The Btrieve table in question is in V8 format.

Brian Scoffield
 
 
Page 1 of 1    
All times are GMT
The time now is Tue Dec 01, 2009 9:16 pm