![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
#4
| ||||
| ||||
|
|
Why can't processes on different physical nodes share the same environment? An environment is simply a disk location, so if the database is stored on a network drive, more than one machine will have access to it. |
|
If locker ids are assigned by bdb, why expose an API to create new ones? |
|
I can live with the risk of getting a deadlock without bdb detecting it for me, but the question is: can I use the BDB locking system for my own application level locks. For example, I would like some node in my cluster to be able to say: nobody else should be changing that record until I finish some processing, after which I will release the lock. |
|
Perhaps I don't understand the concepts of locker id and locks. You are saying that if process share the same locker id, they do not block each other. Isn't the whole mechanism of locking based on the idea of "resource aqcuisition/release" where a resource is identified abstractly by such a locker id? |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
Michael, Thanks a lot - it's much clearer now. So, to sum: 1) To have a BerkeleyDB reside in a remote filesystem, we need to make sure it's fully POSIX compliant. Otherwise, we may have data inconsistencies. As long as our remote filesystem support correct fsync semantics, we are fine. 2) Basically, if we want distributed locks, we need to roll our own. One idea that comes to mind is to define a naming schema for BDB lock objects that does not conflict with BDB's own naming, and work with those as "distributed locks". However, this assums that the lock table is immediately fsync-ed, it's never cached so that all nodes in the cluster have access to the latest "lock information". Is there a way to make sure the lock table is not cached, but maintained directly on disk? Actually, I should be reading the source code for that probably... ![]() |
|
Thanks again for all those clarifications! Boris |
#7
| |||
| |||
|
#8
| |||
| |||
|
|
I'm not insisting on "leveraging" BDB locks. I need application-level locks (BDB by default locks at the page or record level, but I need more control) in my distributed application the same way one needs mutexes in a multithreaded application. That's all. If BDB locks are not suitable for this, I'll have to figure out something else, I guess... |
![]() |
| Thread Tools | |
| Display Modes | |
| |