![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
My question is:What make the database corrupt after the application crash? |
|
How can fix it?(I don't want the application can't restart after the user kill it) |
#4
| |||
| |||
|
|
My question is:What make the database corrupt after the application crash? Berkeley DB maintains state in memory for performance reasons, and to maintain consistency between multiple threads. So when the process is killed, the data on disk is not complete (it is missing that data in memory). How can fix it?(I don't want the application can't restart after the user kill it) To recover after a crash, you need to write a transactional application. See this section of the documentation for more information: http://www.sleepycat.com/docs/ref/transapp/intro.html Regards, Michael. |
#5
| |||
| |||
|
|
Because the performance, I can't use a transactional protect in my application! |
|
On the top I mean the data missing in memory is accepted by me.But some time it can't use the db file again(lose all data in the file i write before).How can guarantee the db file not corrupt and i can't access the data i write before? |
#6
| |||
| |||
|
|
Because the performance, I can't use a transactional protect in my application! What are your performance requirements? There are many ways to configure Berkeley DB for high performance transactions. On the top I mean the data missing in memory is accepted by me.But some time it can't use the db file again(lose all data in the file i write before).How can guarantee the db file not corrupt and i can't access the data i write before? The only ways to ensure that files on disk are consistent when your application starts are: * use transactions and recovery; or * shut down cleanly (that is, close all databases and the environment before processes exit). Regards, Michael. |
#7
| |||
| |||
|
|
Michael Cahill wrote: Because the performance, I can't use a transactional protect in my application! What are your performance requirements? There are many ways to configure Berkeley DB for high performance transactions. On the top I mean the data missing in memory is accepted by me.But some time it can't use the db file again(lose all data in the file i write before).How can guarantee the db file not corrupt and i can't access the data i write before? The only ways to ensure that files on disk are consistent when your application starts are: * use transactions and recovery; or * shut down cleanly (that is, close all databases and the environment before processes exit). Regards, Michael. Thanks Michael! My performance requirements is :insert or update or del 3000 items in db.What i can do ? |
![]() |
| Thread Tools | |
| Display Modes | |
| |