Bidirectional Conflicts, Simplified: Detect, Resolve, and Reconcile in SymmetricDS

Three stages of conflict resolution

Short answer: SymmetricDS handles bidirectional conflict resolution out of the box. It detects conflicts by comparing the changed columns, and when a real conflict occurs, the newer change wins. You can tune detection, resolution and reconciliation per table when the defaults aren't enough.

Key takeaways

  • SymmetricDS ships with conflict handling on, so bidirectional setups work without configuring any conflict rules.
  • Every conflict passes through three stages: detect, resolve and reconcile.
  • Default detection looks at changed data, so edits to different columns of the same row do not conflict.
  • Newer wins compares the internal capture time of each change, so the table needs no timestamp or version column.
  • Shortening routing, push and pull intervals narrows the conflict window and prevents conflicts before they occur.

Conflict Handling Works Out of the Box

SymmetricDS ships with conflict handling already on. With no conflict rules configured, it detects conflicts by looking at the changed data. If two sides edit different columns of the same row, there's no conflict. When a real conflict does occur, the newer change wins. For many bidirectional setups, that's enough to start. The rest of this post covers how to go further. For the big picture, see Bidirectional Replication: Point-to-Point vs. Hub-and-Spoke. To go further, it helps to see the three stages every conflict passes through.

Three Stages: Detect, Resolve, Reconcile

Every conflict moves through three stages: SymmetricDS detects it, resolves it, and reconciles the result. By default, reconciliation sends the final value back so both nodes end on the same value. That is not the only option. You can set one side to always win, or route the conflict to manual reconciliation. The sections below follow that order, starting with how a conflict gets spotted.

Three stages of conflict resolution

Stage 1: Detection

Detection happens at the target, as each incoming change loads. SymmetricDS compares the change to the row already there and flags a conflict if the two don't line up. The detector you pick sets what "line up" means. Most teams never need to think hard about it, so start with the default.

Default: Column (Changed Data)

Column detection is the default, and for most use cases and most tables it is all you need. It works on the data you already have, so you get conflict protection without configuring anything and without changing your tables.

  • Column (Changed Data): Flags a conflict only when the columns that actually changed differ between the source's old values and the target's current row. Use it as your starting point for most tables. If two sites edit different columns of the same row, there is nothing to fight over, so the changes can be merged.

Conflict changed data detection

Secondary options: Row and Full

When the default doesn't fit how a table is used, two other detectors work on the data you already have in your tables.

  • Row (Primary Key): Checks only the primary key. Use it when conflicts are not expected and you don't want the extra comparison.
  • Full (Old Data): Checks every column against the source's old values and flags a conflict if any of them differ. Use it when merging is not acceptable and the full row should win or lose as a unit.

Dependent options: Timestamp and Version

Timestamp and Version detection compare an existing timestamp or version column between source and target. They work only if your tables carry that column and your application keeps it current.

  • Timestamp: Compares a timestamp column between source and target. Use it when a trustworthy last-update column is already part of the design. Every replicated table you apply it to must set the value on every change.
  • Version: Compares a version column between source and target. Use it when a reliable version column is already part of the design. Every replicated table you apply it to must maintain the value on every change.

Once a row is flagged, the next question is what to do with it.

Stage 2: Resolution

Once a row is flagged, the resolver decides what happens to it as it loads.

Resolver What it does Best for
Newer Wins (+ Fallback) default Keeps the change that was captured more recently, with the same fallback logic: inserts fall back to updates and updates fall back to inserts High-volume data
Fallback Applies the change anyway, turning inserts into updates and updates into inserts Low-risk data
Ignore Discards the incoming change Tables where the target is the source of truth
Manual Holds the change for review in the web console Tables where conflicts are not expected

Newer wins does not rely on a timestamp or version detector. It compares the capture time that SymmetricDS records internally for each change, so you don't need a timestamp or version column on the table. Choose automatic when volume is high and a wrong guess is cheap. Choose manual when someone must answer for the final value.

Resolving the row at the target is only half the job, though, because the source also needs to hear the outcome.

Conflict resolution in action.

Stage 3: Reconciliation

Resolving a conflict at the target can leave the source holding a different value. Reconciliation closes that gap. The ping back setting in the conflict rule tells the target whether to capture the resolved row and send it back to the source node. The options are Off, Single Row (only the conflicting row), and Remaining Rows (the rest of the batch too). Without it, a resolved conflict can leave the two nodes quietly out of sync. This is separate from the sibling routing covered in the hub-and-spoke post.

You don't have to apply all three stages the same way everywhere, which is where table-level rules come in.

Tune It Table by Table

Conflict rules don't have to be global. You can set them per table, so a busy table gets stricter handling than a quiet one. Only 22% of customers configure explicit conflict rules, yet 67% run bidirectional sync, so most run well on the defaults. Table-level tuning is there when you need it.

For example, an orders table edited from several sites might use timestamp detection with newer wins. A store_hours table edited from one place can stay on the defaults.

Conflicts configured by table.

Tuning rules is one lever. Another stops conflicts before they start.

Prevent Conflicts: Sync More Often

A conflict needs a window: two sides change the same row before either change reaches the other. Shrink the window and conflicts drop. Shorten the routing, push, and pull intervals so changes travel sooner. Faster sync won't eliminate conflicts, but fewer will reach detection and resolution. Treat it as a tuning knob, not just a cleanup problem.

Reduce conflict window.

Whatever you tune, it's worth knowing how this capability compares with other tools.

Takeaway

The defaults are a solid starting point. When a table needs more, work through the three stages in order: tune detection, choose a resolver, set ping back. Start with the conflict documentation, then revisit the bidirectional patterns post and the hub-and-spoke post.

Frequently asked questions

Do I need to configure conflict rules to use bidirectional sync in SymmetricDS?

No. Conflict handling is on by default. It detects conflicts using changed data, and when a real conflict occurs, the newer change wins. For many bidirectional setups that is enough to start.

What happens if two sites edit different columns of the same row?

Nothing conflicts. Default column (changed data) detection checks only the columns that changed, so edits to different columns merge cleanly. Only edits to the same column are flagged.

Which conflict detection types does SymmetricDS offer?

Column (Changed Data, the default), Row (Primary Key), Full (Old Data), Timestamp and Version. Timestamp and Version work only if your tables carry a reliable timestamp or version column.

Does newer wins need a timestamp or version column on my table?

No. Newer wins compares the capture time SymmetricDS records internally for each change, so it does not rely on a timestamp or version detector or column.

What is ping back in SymmetricDS conflict rules?

Ping back tells the target whether to capture the resolved row and send it back to the source node. The options are Off, Single Row and Remaining Rows. It keeps both nodes on the same value.

Can I set different conflict rules for different tables?

Yes. Rules can be set per table, so a busy table like orders can get stricter handling than a quiet one like store_hours that is edited from one place.