3

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

1 Answer 1

4

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.

2
  • 1
    thanks that did the trick. But i also found another solution which is like this, create a new group link from STORE_TO_STORE (source_node_group_id, target_node_group_id, data_event_action) values ('store', 'store', 'P'); Check out the documentation for more information on both setups. symmetricds.org/doc/3.8/html/user-guide.html#_table_triggers
    – nixon1333
    Commented Dec 7, 2017 at 8:29
  • 1
    It has worked correctly, as a note that my case is a "corp" server node always connected to the internet and several "store" mobile devices without internet in some occasions. With this setting it is the "corp" node that sends the changes to the "store" when it connects to "corp". The solution that @boris-pavlović has mentioned is perfect for my situation, so that all the computers have the same information.
    – mrddr
    Commented May 18 at 1:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.