View Issue Details

IDProjectCategoryView StatusLast Update
0004323SymmetricDSBugpublic2020-05-04 07:02
Reportermkleczek Assigned To 
Priorityhigh 
Status newResolutionopen 
Product Version3.11.5 
Summary0004323: Auto registration fails when custom sync.table.prefix is used due to missing tables when processing virtual 9999 batch
DescriptionMy setup is such that two SymmetricDS nodes use the same database for SymmetricDS tables but slave node is a load only node.
Slave node has the following settings:
load.only = true
db.url=[same as master node - non-Oracle]
...
sync.table.prefix=slave_sym
target.db.url=[slave db url - Oracle]
...
registration.url=[sync url of master]

Master node has the following settings:
load.only = false
db.url=[master db url - non-Oracle]
...
registration.url=[own sync url]
auto.registration = true

When slave node is starting up it successfully contacts master node and initializes registration. Then it reports:
INFO | jvm 1 | main | 2020/03/20 20:08:07.605 | ERROR [slave-dataloader-2] [DefaultDatabaseWriter] Failed to run the following sql: delete from sym_job
INFO | jvm 1 | main | 2020/03/20 20:08:07.605 | ERROR [slave-dataloader-2] [ManageIncomingBatchListener] Failed to load batch i2itarget--9999
INFO | jvm 1 | main | 2020/03/20 20:08:07.617 | org.jumpmind.db.sql.SqlException: ORA-00942: table or view does not exist

Stack trace follows...

INFO | jvm 1 | main | 2020/03/20 20:08:07.622 | INFO [slave-job-3] [RegistrationService] Could not register. Sleeping for 1000ms before attempting again.
INFO | jvm 1 | main | 2020/03/20 20:08:08.631 | INFO [slave-job-3] [RegistrationService] This node is unregistered. It will attempt to register using the registration.url
Tagsregistration

Activities

elong

2020-04-28 13:35

developer   ~0001710

If you use the same sync.table.prefix on both sides, the registration will work. Master is sending a registration batch with SYM tables in it, but slave can't load it because its tables are prefixed as SLAVE_SYM.

I'm not sure how to fix the scenario so it would work. Maybe config channel batches would need to always send ${sync.table.prefix} and do a replacement when loading.

mkleczek

2020-05-04 07:02

reporter   ~0001713

My workaround was to subclass TriggerRouterService and provide custom routers for sym tables (it somewhat works but not always - did not have time to analyze further).

But I think the solution with $(sync.table.prefix) seems cleaner.

Issue History

Date Modified Username Field Change
2020-03-20 17:56 mkleczek New Issue
2020-04-28 13:35 elong Note Added: 0001710
2020-04-28 13:35 elong Tag Attached: registration
2020-05-04 07:02 mkleczek Note Added: 0001713