Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Berkely DB > DB_NOLOCKING us...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1787 of 1800
Post > Topic >>

DB_NOLOCKING use in production

by Mark Hindley <mark@[EMAIL PROTECTED] > Feb 7, 2008 at 10:01 AM

Hi,

I have an application which uses a Berkeley DB in concurrent data store
mode via the Perl bindings. There are multiple processes accessing the
database, but they write only infrequently so I can live with the
limitation of only having 1 writer at a time.

Each process calls set_isalive and failchk after opening the environment
and recovers with a private environment if DB_RUNRECOVER is returned
before going on to open the database.

However, I occasionally get a hang when a new process tries to
open/join the environment, especially if a previous process has quit
unexpectedly.  Working around this seems a bit chicken and egg, as I
need to open the environment before I can failchk it.

Once this hang has occurred, all the db utilities also hang accessing
the environment, so it appears there is some sort of deadlock.

I don't want to recover every time a process starts as it will hose any
other running processes.

I have come up with a solution which I would like your thoughts on:
First open an environment with DB_NOLOCKING and failchk/recover as
required. This gets round the hang (which is presumably mutex related).
Finally open an environment to use for the application without
DB_NOLOCKING.

I notice the docs say DB_NOLOCKING is for debugging only. Does anyone
have thoughts on is use in this scenario? Or is there another way around
this issue that I have not thought of?

Many thanks,

Mark




 1 Posts in Topic:
DB_NOLOCKING use in production
Mark Hindley <mark@[EM  2008-02-07 10:01:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Fri Jul 4 18:36:02 CDT 2008.