Sorry, its me again. I’m trying to add support for redundancy to my driver module, and stuck at transferring the state of the active backup node to the passive master node.
Using the persistent record system works as expected, as long as the master node is active. When the master shuts down, the backup node becomes active and the internal db on the backup is in sync with the master.
Now the backup node starts deleting and inserting persitent records to the db. I expected those records to be updated on the master once it becomes available again, but this does not happen.
When i request the master to become the responsible node, it starts with the old database, which is not in sync with the backup anymore. Sometimes (i think when i try to delete a record on the master that is already deleted on the backup) the backup node realizes this inconsistency and restarts the service. After the restart the backup is in sync again, but all changes to the backup database are lost.
What am i missing? I searched the javadoc for a method to access the backup database from the master or trigger a sync manually, but this seems not to be possible.