Objectdb recovery



I have question regarding objectdb recovery when objectdb is not finished correctly (power outage).

We are using following configuration:

<recovery enabled="true" sync="false" path="." max="128mb"/>
<recording enabled="false" sync="false" path="." mode="write"/>

Is there any possibility of data loss when power outage?

We have some mechanism for creating unique ids and it seems that this unique id was not recovered corretly after unexpected finish. When are the transactions physically written to recovery file (disk)?

Can setting sync=true (for recovery) help with this issue, how will be the performance affected?




The main purpose of the recovery is to preserve the integrity of the ObjectDB database file. Therefore, after power outage (when recovery is enabled) the database file should not be corrupted. You can check your database file after such events by running the ObjectDB Doctor.

Regarding data lose, recovery returns your database to the most recent stable state, but you may lose some operations that have been performed after that point.

Enabling sync reduces the risk of data loss significantly at the possible cost of performance (the exact effect depends on too many factors, so it has to be checked with your specific application):

<recovery enabled="true" sync="true" path="." max="128mb"/>

This setting guarantees that every invocation of commit will not return before data is physically written to the recovery file (bypassing OS cache). This should prevent any possible data loss of committed transactions.

ObjectDB Support