dbTalk Databases Forums  

Graceful shutdowm

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


Discuss Graceful shutdowm in the comp.databases.berkeley-db forum.



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

Default Graceful shutdowm - 08-30-2005 , 11:33 PM






Hi All

We are using the Java API for BDB. The problem we are trying to solve
is graceful shutdown of the app. Is there a way to detect all existing
cursors before closing the database ? What I mean is if there is a way
to determine that a database close is absolutely safe ? How I can do
this using the Java API ?

Thanks
A


Reply With Quote
  #2  
Old   
studdugie@gmail.com
 
Posts: n/a

Default Re: Graceful shutdowm - 09-01-2005 , 12:14 AM






There is no way via the Java API to query the environment and find all
open cursors and/or transactions and close them. The key to a clean
shutdown is judicious use of try/finally blocks for cursors and
transactions. The good news is if you use transactions and logging you
can get away with a dirty shutdown and run recovery on startup to get
things back in pristine order. The bad news is it doesn't always work.
Berkeley DB can sometimes be very testy and brittle.

Good Luck.


Reply With Quote
  #3  
Old   
Gregory Burd
 
Posts: n/a

Default Re: Graceful shutdowm - 11-22-2005 , 12:55 PM



On 2005-09-01 01:14:14 -0400, studdugie (AT) gmail (DOT) com said:

Quote:
There is no way via the Java API to query the environment and find all
open cursors and/or transactions and close them. The key to a clean
shutdown is judicious use of try/finally blocks for cursors and
transactions. The good news is if you use transactions and logging you
can get away with a dirty shutdown and run recovery on startup to get
things back in pristine order. The bad news is it doesn't always work.
Berkeley DB can sometimes be very testy and brittle.

Good Luck.
Berkeley DB Java Edition should manage the recovery of a failed process
in all cases when configured to run with transactions and recovery. If
it is ever "testy" or "brittle" that is a bug and we'd like to hear
about it so that we can fix it. Please email support (AT) sleepycat (DOT) com
with any such cases.

-greg

__________________________________________________ ___________________

Gregory Burd
Product Manager gburd (AT) sleepycat (DOT) com
Sleepycat Software, Inc. http://www.sleepycat.com/



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