dbTalk Databases Forums  

Concurrent reads & writes

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


Discuss Concurrent reads & writes in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sf sbcglobal
 
Posts: n/a

Default Concurrent reads & writes - 07-11-2005 , 09:08 PM






Hi,

I am getting errors when sharing a database between two applications on two
different Pc's.
Sometimes I am getting error "DB_LOCK->lock_put: Lock is no longer valid".
Even when there is no error, changes made in one application are not
readable from the other application.

Berkeley DB 4.2.52: (December 3, 2003) using C interface compiled with MS
Visual C 6.0, running under Windows 2000 sp4.

The application is a windows multi-threaded program that needs to run two
instances of the program on two separate PC's under windows. Both
application instances need multiple-reader/multiple-writer access. I use
the following flags with DBENV->open():
flags =
DB_INIT_MPOOL |
DB_INIT_LOG |
DB_INIT_TXN |
DB_INIT_LOCK |
DB_THREAD |
DB_CREATE;

The application runs fine under heavy load when not sharing the database.

Dan




Reply With Quote
  #2  
Old   
Michael Cahill
 
Posts: n/a

Default Re: Concurrent reads & writes - 07-11-2005 , 11:55 PM






Hi Dan,

It sounds like you are sharing the databases by having the environment
directory on a Windows network share. Unfortunately, if that is the
case, it is likely that mutexes are not working correctly:

http://www.sleepycat.com/docs/ref/env/remote.html

If you need multi-threaded read-write access from more than one system,
you will need to implement some kind of network communication, such as
DCOM or .NET remoting.

Regards,
Michael.


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 - 2013, Jelsoft Enterprises Ltd.