# Conflict handling

This handler stores conflicts in the database and delivers the resolution if it is stored in the database.

At the end of synchronization, all irrelevant and resolved conflicts are removed from the database as they are no longer needed.

Resolved conflicts are conflicts that have been resolved by a user or a program using the REST API.

Irrelevant conflicts are conflicts that no longer exist. This can be for various reasons, for example, due to the manual deletion of all affected elements.

The current implementation uses a version field in the conflict database table to find irrelevant conflicts. At the start of the synchronization, the version is incremented and new or updated conflicts save the new version number. After synchronization is complete, all conflicts that do not have the new version number are deleted.

Information

There was an alternative approach that used a timestamp to delete all conflicts older than the current timestamp.

For reasons of correctness, this timestamp had to be updated to prevent a conflict that was found during a previous synchronization run and still exists from being deleted.

The problem was that this timestamp can also be shown to users, and it can be confusing if a conflict suddenly has a different timestamp.

Last updated: May 16, 2025 at 9:13 AM