Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: BerkeleyDB continue

by flexvault (Monsignor)
on Jul 15, 2011 at 13:16 UTC ( #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
Node Status?
node history
Node Type: note [id://914607]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2021-01-19 15:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?