SymmetricDS同步未完全同步 [英] SymmetricDS Syncing is not syncing perfectly

查看:98
本文介绍了SymmetricDS同步未完全同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台运行SymmetricDS的3台服务器.说我有节点1是主节点,节点2是节点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上,这将非常有帮助

此致

Nixon

解决方案

将通过主站1从2同步到3(反之亦然)所需的表的sym_triggersync_on_incoming_batch设置为1./p>

I have a 3 server running SymmetricDS. Say i have node 1 which is master, node 2.node 3 are child.

When some data is being inserted into node 2 it's being synced to node 1 and similarly node 3's data is being syncing with node 1. But node 2 data is not going to node 3.

I do not know where to solve this issue. Here is the sample configuration 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

It would be very helpful if i can know how to push node 2's data to node 3. or node 2 push data on node 1 and then node 1 push those data to node 3

Regards,

Nixon

解决方案

Set the sym_trigger's column sync_on_incoming_batch to 1 for the tables needed to get synced from 2 to 3 and vice-versa via master 1.

这篇关于SymmetricDS同步未完全同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆