通过列匹配路由器的 SymmetricDS 双向同步

SymmetricDS Two Way Sync via Column Match Router

我有 3 个节点,1 个是主机(称为 'A'),2 个是引用主机的来宾(称为 'B' 和 'C')。

有一天,'A'通过列匹配路由器向'B'发送数据,不幸的是'A'是错误的。 'A'应该向'C'发送数据,但是数据已经记录在'B'中,也记录在'C'中(在重新发送到'C'之后)。

如何删除'B'中的数据?或者另一个问题是如何通过列匹配路由器进行双向同步? 最后,我想同步主机和目标来宾,即使我修复了行所以错误节点中没有 "not-related-column"。

谢谢

使用Subselect Router:

A 'subselect' router can be used in these cases. A 'subselect' is configured with a router expression that is a SQL select statement which returns a result set of the node ids that need routed to. Column tokens can be used in the SQL expression and will be replaced with row column data.

使用:

symadmin send-sql --node B mytable "delete from mytable where id = 257"

删除节点B上误发的数据