数据路由到SymmetricDS中的错误表

时间:2017-08-02 12:11:24

标签: postgresql synchronization symmetricds

我有两台服务器 - 主服务器和辅助服务器用于同步。我们正在使用symmetricDS版本3.4.8

我尝试将T1从主要同步到次要,但我发现symmetricDS尝试同步到辅助中的错误表(到T2而不是T1)。这导致批处理失败并出现错误,因为symmetricDS正在尝试将数据插入T2,并且其中的列具有与T1不同的类型。所以我得到一个“java.lang.NumberFormatException:Illegal embedded sign ch”异常

造成这个问题的原因是什么?

 secondary  symmetric.log.2 :
 ERROR [Secondary-[PostgreSqlDatabasePlatform] [secondary--pull-6] Could not convert a value of for column level of type INTEGER

在同步期间(初始加载结束后),批量同步失败。查询错误时,我看到以下内容:

select * from sym_outgoing_batch where error_flag=1;
---------------------------------------------------------
batch_id             | 252
node_id              | {F5C9475E-1B77-48A8-A763-D98054D64AD4}
channel_id           | sync_tables_channel
status               | LD
load_id              | -1
load_flag            | 0
error_flag           | 1
common_flag          | 0
sql_state            |
sql_code             | 0
sql_message          | java.lang.NumberFormatException: Illegal embedded sign ch
failed_data_id       | 268
---------------------------------------------------------

T1 from primary:
select * from sym_data where data_id=268;
-[ RECORD 1 ]---+------------------------------------------------------------------------------------------------------------------
data_id         | 268
***table_name      | T1***
event_type      | U
row_data        | "50415420-5665-7273-696f-6e2049442020","523187","87837","2016-04-29 14:03:23.525545","2016-04-29 14:03:23.525000"
pk_data         | "50415420-5665-7273-696f-6e2049442020"
old_data        | "50415420-5665-7273-696f-6e2049442020","523186","87836","2016-04-29 14:03:23.525545","2016-04-29 14:03:23.525000"
trigger_hist_id | 128
channel_id      | sync_tables_channel
transaction_id  | 72814136
create_time     | 2017-07-16 19:16:28.998913

然后当我检查具有相同批处理ID的辅助服务器时,我看到错误的target_table_name

select * from sym_incoming_error where batch_id=252;
  -------------------------------------------------------
batch_id            | 252
node_id             | {5A4F5527-3FA5-2A46-A163-B987BDEFB832}
failed_row_number   | 2
failed_line_number  | 2
***target_table_name   | T2***
event_type          | U
row_data            | "50415420-5665-7273-696f-6e2049442020","523187","87837"
old_data            | "50415420-5665-7273-696f-6e2049442020","523186","87836","2      016-04-29 14:03:23.525545","2016-04-29 14:03:23.525000"

0 个答案:

没有答案