gpt4 book ai didi

synchronization - SymmetricDS 同步未完美同步

转载 作者:行者123 更新时间:2023-12-04 07:15:06 26 4
gpt4 key购买 nike

我有一个运行 SymmetricDS 的 3 服务器。假设我的节点 1 是主节点,节点 2.node 3 是子节点。

当一些数据被插入到节点 2 时,它被同步到节点 1,类似地,节点 3 的数据正在与节点 1 同步。但是节点 2 的数据不会进入节点 3。

我不知道在哪里解决这个问题。这里是示例配置sql

        -- =========================================
-- channel starts

insert into sym_channel
(channel_id, processing_order, max_batch_size, enabled, description)
values('acc', 1, 100000, 1, 'account sample');

-- =========================================
-- channel ends



-- =========================================
-- group starts

insert into sym_node_group
(node_group_id, description)
values ('corp', 'A corporate node');
insert into sym_node_group
(node_group_id, description)
values ('store', 'A retail store node');
-- group ends
-- =========================================




-- =========================================
-- Group links starts

insert into sym_node_group_link
(source_node_group_id, target_node_group_id, data_event_action)
values ('store', 'corp', 'P');
insert into sym_node_group_link
(source_node_group_id, target_node_group_id, data_event_action)
values ('corp', 'store', 'W');

-- Group link ends
-- =========================================



-- =========================================
-- trigger starts
insert into
sym_trigger (trigger_id, source_table_name, channel_id, last_update_time, create_time)
values ('a1', 'acc_asi', 'acc', current_timestamp, current_timestamp);

insert into
sym_trigger (trigger_id, source_table_name, channel_id, last_update_time, create_time)
values ('a2', 'acc_lop_asi', 'acc', current_timestamp, current_timestamp);

-- =========================================
-- trigger ends




-- =========================================
-- router starts
insert into sym_router
(router_id,source_node_group_id,target_node_group_id,router_type,create_time,last_update_time)
values('corp_2_store', 'corp', 'store', 'default',current_timestamp, current_timestamp);
insert into sym_router
(router_id,source_node_group_id,target_node_group_id,router_type,create_time,last_update_time)
values('store_2_corp', 'store', 'corp', 'default',current_timestamp, current_timestamp);
-- router ends
-- =========================================



-- =========================================
-- trigger router starts

insert into sym_trigger_router
(trigger_id, router_id, initial_load_order, create_time, last_update_time)
values ('a1', 'store_2_corp', 1, current_timestamp, current_timestamp);

insert into sym_trigger_router
(trigger_id, router_id, initial_load_order, create_time, last_update_time)
values ('a2', 'store_2_corp', 1, current_timestamp, current_timestamp);

insert into sym_trigger_router
(trigger_id, router_id, initial_load_order, create_time, last_update_time)
values ('a1', 'corp_2_store', 1, current_timestamp, current_timestamp);

insert into sym_trigger_router
(trigger_id, router_id, initial_load_order, create_time, last_update_time)
values ('a2', 'corp_2_store', 1, current_timestamp, current_timestamp);

-- =========================================
-- trigger router ends

如果我知道如何将节点 2 的数据推送到节点 3,或者节点 2 将数据推送到节点 1,然后节点 1 将这些数据推送到节点 3,那将非常有帮助

问候,

尼克松

最佳答案

sym_trigger 的列 sync_on_incoming_batch 设置为 1,以便通过主 1 从 2 同步到 3,反之亦然。

关于synchronization - SymmetricDS 同步未完美同步,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47675377/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com