Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: [OT]? Behavior of Berkeley DB cache when reading cached page that was changed on disk by another app

by DrWhy (Chaplain)
on May 06, 2011 at 02:16 UTC ( [id://903286]=note: print w/replies, xml ) Need Help??


in reply to Re: [OT]? Behavior of Berkeley DB cache when reading cached page that was changed on disk by another app
in thread [OT]? Behavior of Berkeley DB cache when reading cached page that was changed on disk by another app

No, all of Berkeley DB's built-in concurrency and transaction control is predicated on a DB 'Environment', which, among other things, contains shared memory segments. So all processes/threads that are under transaction control must be on the same computer. My application runs on multiple computers sharing an NFS mount, and under this architecture the BDB Environment structures will not work properly.

What I was looking for was information from anyone in the know about BDB's Memory Pools (the structures that implement the caching layer in BDB). What I wondered is whether these memory pools were smart enough to detect when a file had been modified by some agnet outside of their control and could then be made to invalidate any cached pages for that file. What I've been able to find on the Web so far is inconclusive, but it doesn't look like there's any mention of such smarts being a part of this technology. Therefore unless someone can tell me otherwise I think I'm stuck with closing and reopening database connections every time I want to obtain a lock and do work in order to assure that the caching is not invalidated by work done by other processes since the last time I had a database lock.

--DrWhy

"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."

  • Comment on Re^2: [OT]? Behavior of Berkeley DB cache when reading cached page that was changed on disk by another app

Replies are listed 'Best First'.
Re^3: [OT]? Behavior of Berkeley DB cache when reading cached page that was changed on disk by another app
by Anonymous Monk on May 06, 2011 at 04:01 UTC
    Therefore unless someone can tell me otherwise I think I'm stuck with closing and reopening database connections every time I want to obtain a lock and do work in order to assure that the caching is not invalidated by work done by other processes since the last time I had a database lock.

    I won't come out and say otherwise even though I believe so, but I will say, devise a simple test, and test it

    Here is a paper of interest Chunk: A Framework for Modular Distributed Shared Memory Systems

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://903286]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2025-02-16 11:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found