Konstantin Sorokin wrote:
Quote:
If I want to test database recovery after power loss what is the best way
to emulate db corruption without actually switching off power ? Sending
SIGKILL signal to app. does not work with 100% guarantee of data
corruption. |
Switching off the power wouldn't work 100% of the time either. You need
to guarantee that a transaction is actually in progress when the system
goes down.
You might try writing a driver program that does something like this:
1. fire up the database
2. partially execute one or more transactions
3. assert(false)
Then see what happens the next time you start up BDB.
Ryan