dbTalk Databases Forums  

BerkeleyDB concurrency

comp.databases comp.databases


Discuss BerkeleyDB concurrency in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nathan Hackett
 
Posts: n/a

Default BerkeleyDB concurrency - 08-07-2003 , 03:48 PM






I am trying to implement a concurrent database using the BerkeleyDB perl module and have two problems. (BerkeleyDB 0.23 with db-3.3.11)

The first is that when I try to create a second DB_WRITECURSOR cursor on the same database, instead of blocking, the call to db_cursor() returns status 22 "invalid argument". I can't figure this out. All the sleepycat docs claim that the call should block until the other lock is released? Is there a way to set the environment as nonblocking? I could not find that documented anywhere.

The second is that it appears from the BerkeleyDB.xs file that when DB_INIT_CDB is used to open the environment, then all cursors are created with the DB_WRITECURSOR flag set. But that means that you can not have multiple cursors at all and the whole consept of concurrency is out the window?

Can anyone elaborate on why that is so that I know what I might break if I go in and fix it? Is there a workaround already? How can I have concurrent access when all cursors are created as write cursors?

Thanks,

/Nathan.

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.