dbTalk Databases Forums  

Re: sporadic locking / db-4.1.24

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss Re: sporadic locking / db-4.1.24 in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michael Ubell
 
Posts: n/a

Default Re: sporadic locking / db-4.1.24 - 08-19-2003 , 11:49 AM






Patrick,

Since you are specifying DB_TXN_NOWAIT, the DB_LOCK_NOTGRANTED return
indicates that a lock is held on that key (acatually the page holding
that key). You can run db_stat -Cl on the environment to see
what locks are currently held. I don't recall any bug fixes in
this area since 4.1.24. We fixed some bugs involved with
DIRTY_READ and lock timeouts but you are not using those features.

Michael Ubell
Sleepycat Software.

Reply With Quote
  #2  
Old   
Chris Newcombe
 
Posts: n/a

Default Re: sporadic locking / db-4.1.24 - 08-19-2003 , 04:57 PM






ubell (AT) sleepycat (DOT) com (Michael Ubell) wrote in message news:<36b1555f.0308190849.6b451aca (AT) posting (DOT) google.com>...
Quote:
Since you are specifying DB_TXN_NOWAIT, the DB_LOCK_NOTGRANTED return
indicates that a lock is held on that key (acatually the page holding
that key).
Patrick earlier wrote..
Quote:
Apart from the single daemon process, about once per hour, a cron job
opens the same databases readonly, and runs through them with a cursor
to dump all entries.

One thing that occurs to me (because I hit a similar case): After you
run through the database with a cursor, are you certain that you are
closing the cursor after getting 'NOTFOUND' (i.e. after reading the
last record)? It's non-intuitive but the cursor does still have a
lock on the last page even if you interpret "NOTFOUND" to mean 'have
run off the end of the database'. (I believe the lock is held in
order to support Dbc::get(DB_PREV) on a cursor that has returned
NOTFOUND to a get(DB_NEXT).)

Hope this helps.

regards,

Chris


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.