Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: BerkeleyDB continue

by flexvault (Monsignor)
on Jul 15, 2011 at 13:16 UTC ( [id://914607]=note: print w/replies, xml ) Need Help??


in reply to BerkeleyDB continue

You need to periodically do a 'db_sync()', not just at the end of the program. BerkeleyDB is never in a finished state unless you do a 'db_sync' and then a 'db_close' when you are finished. For performance reasons, BDB only writes the data to disk when the internal buffers are full or when it receives the 'db_sync()'. I guess doing a periodic 'untie' and then 'tie' might work also. I stopped using 'tie' with BerkeleyDB because I didn't have the control over the cache size that you get when you use BerkeleyDB commands directly.

If your script runs continuously then you may want to look at 'signals' to help shutdown you application ('db_sync' then 'db_close' or 'untie') before you turn off the computer.

Thank you

"Well done is better than well said." - Benjamin Franklin

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-03-28 23:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found