SymmetricDS 双向同步双插

SymmetricDS Two Way Synchronization Double Insert

我有 server 个节点和 client 个节点。他们在 table 上进行双向同步,并且都具有 sync_on_incoming_batch = 1.

假设,table 结构是 (id, name)

场景是:

  1. server插入数据(1, 'a')
  2. client插入数据(1, 'b')
  3. server 发送一批 (1, 'a')client
  4. client 发送一批 (1, 'b')server
  5. 现在,server 有数据 (1, 'b')client 有数据 (1, 'a')

问题是:

  1. server收到(1, 'b')后,为什么server不能再次将数据路由到clientserver 上的 sym_outgoing_batch 中的 node_id = -1 检测到它。 client.
  2. 反之亦然
  3. 如何根据最近的数据同步数据?所以在这种情况下,结果是 (1, 'b') in all node.
  1. sync_on_incoming_batch 告诉 symmetricDs 不要将数据路由回源节点
  2. 添加冲突检测与解决策略newer wins