View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005707 | SymmetricDS | Bug | public | 2023-02-23 02:47 | 2023-03-08 19:07 |
Reporter | zhujiawen | Assigned To | |||
Priority | urgent | ||||
Status | closed | Resolution | no change required | ||
Product Version | 3.14.5 | ||||
Summary | 0005707: The source node table insert row not sync target node table | ||||
Description | I found sys_data new event when I had inserted row in source node table: mysql> select * from sym_data where table_name='system_icon'; +---------+-------------+------------+----------------------+---------+----------+-----------------+------------+----------------+----------------+---------------+-----------+--------------+---------------------+ | data_id | table_name | event_type | row_data | pk_data | old_data | trigger_hist_id | channel_id | transaction_id | source_node_id | external_data | node_list | is_prerouted | create_time | +---------+-------------+------------+----------------------+---------+----------+-----------------+------------+----------------+----------------+---------------+-----------+--------------+---------------------+ | 46415 | system_icon | I | "25","test1","test1" | NULL | NULL | 34 | user_new | 1213.2624135 | NULL | NULL | NULL | 0 | 2023-02-23 10:27:04 | +---------+-------------+------------+----------------------+---------+----------+-----------------+------------+----------------+----------------+---------------+-----------+--------------+---------------------+ 1 row in set (0.02 sec) The target node table was null and initial_load_time is NULL: mysql> select * from system_icon; Empty set (0.00 sec) mysql> select * from sym_node_security \G; *************************** 1. row *************************** node_id: 001 node_password: KA343swSjjfxQ1AVFrxitYEbOcYi6F registration_enabled: 1 registration_time: NULL registration_not_before: NULL registration_not_after: NULL initial_load_enabled: 1 initial_load_time: NULL initial_load_end_time: NULL initial_load_id: -1 initial_load_create_by: symadmin rev_initial_load_enabled: 0 rev_initial_load_time: NULL rev_initial_load_id: 0 rev_initial_load_create_by: NULL failed_logins: 0 created_at_node_id: NULL *************************** 2. row *************************** node_id: 002 node_password: PgJE1lwGvZqUwnJGHZt19DB2aL8bPF registration_enabled: 1 registration_time: 2023-02-23 10:46:35 registration_not_before: NULL registration_not_after: NULL initial_load_enabled: 1 initial_load_time: NULL initial_load_end_time: NULL initial_load_id: -1 initial_load_create_by: symadmin rev_initial_load_enabled: 0 rev_initial_load_time: NULL rev_initial_load_id: 0 rev_initial_load_create_by: NULL failed_logins: 0 created_at_node_id: 001 2 rows in set (0.01 sec) ERROR: No query specified The symmetric.log not found error log. | ||||
Tags | No tags attached. | ||||
|
attachment: target node log |
|
target id: mysql> select * from sym_incoming_batch; Empty set (0.00 sec) |
|
The problem was sloved fllow next: 1. remove target node use commond: ./bin/symadmin remove-node and re-registration。 2. update sym_trigger filed last_update_time=current_timestamp New problem: I created a bidirectional synchronization trigger, but the trigger_router was not associated with the target node, so the newly added records on the target node were not synchronized to the source node. What should I do to synchronize the data before the trigger_router was not associated with the source node |
|
You could insert a reload event with a where clause to select the newly-added records on the target node and sync them to the source node. Another option would be to use the symadmin command like this: symadmin reload-table [table name] -n [node ID] -w "[where clause]" You can find more information about this in our user guide: https://www.symmetricds.org/doc/3.14/html/user-guide.html#_send |
|
@emiller The result output :source node not "test_yz" table when I used fllow command sync target node table to soure node: symadmin reload-table test_yz -n 001 --engine cd-001 Use fllow SQL sync target node table schema to soure node success: insert into sym_data (node_list, table_name, event_type, trigger_hist_id, channel_id, create_time) select '001', source_table_name, 'C', trigger_hist_id, 'reload', current_timestamp from sym_trigger_hist where source_table_name = 'test_yz' and inactive_time is null; I have tried sync table data to source node not success: insert into sym_data (node_list, table_name, event_type, row_data, trigger_hist_id, channel_id, create_time) select '001', source_table_name, 'R', '"number=1"', trigger_hist_id, 'reload', current_timestamp from sym_trigger_hist where source_table_name = 'test_yz' and inactive_time is null; insert into sym_data (node_list, table_name, event_type, row_data, trigger_hist_id, channel_id, create_time) select '001', source_table_name, 'S', '"select * from test_yz where number=1"', trigger_hist_id, 'reload', current_timestamp from sym_trigger_hist where source_table_name = 'test_yz' and inactive_time is null; |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-02-23 02:47 | zhujiawen | New Issue | |
2023-02-23 02:49 | zhujiawen | Note Added: 0002259 | |
2023-02-23 02:49 | zhujiawen | File Added: symmetric.log | |
2023-02-23 03:24 | zhujiawen | Note Added: 0002260 | |
2023-02-23 07:58 | zhujiawen | Note Added: 0002261 | |
2023-03-01 18:40 | emiller | Note Added: 0002271 | |
2023-03-01 18:41 | emiller | Status | new => feedback |
2023-03-01 18:43 | emiller | Note Edited: 0002271 | View Revisions |
2023-03-03 01:59 | zhujiawen | Note Added: 0002279 | |
2023-03-03 01:59 | zhujiawen | Status | feedback => new |
2023-03-08 19:07 | jvanmeter | Status | new => closed |
2023-03-08 19:07 | jvanmeter | Resolution | open => no change required |