View Issue Details

IDProjectCategoryView StatusLast Update
0002824SymmetricDSBugpublic2024-02-28 18:59
Reporterrwfuller Assigned Tojosh-a-hicks  
Prioritynormal 
Status closedResolutionreopened 
Product Version3.8.4 
Summary0002824: Sending table reload request from 3.8.4 Central to 3.5.22 client fails to insert record
DescriptionCentral node is at version 3.8.4
Client node is at 3.5.22

Sending multiple table reload requests fails due to primary key issue. It appears SYM_TABLE_RELOAD_REQUEST.CREATE_TIME was added as a primary key at some point after 3.5.22. This is causing an issue when other requests exist in the table with this stacktrace.

2016-09-21 11:25:24,164 [symmetricds-pull-1] ERROR org.jumpmind.symmetric.service.impl.DataLoaderService.batchInError() 884 : Failed to load batch 000000-159699 because: Detected conflict while executing INSERT on SYM_TABLE_RELOAD_REQUEST. The primary key data was: {TARGET_NODE_ID=000000, SOURCE_NODE_ID=70770093, TRIGGER_ID=DEV-1-2605_ICD9, ROUTER_ID=DEV-1-2605_Central_Router, CREATE_TIME=2016-09-21 11:25:04.470000000}. Failed to fallback.
org.jumpmind.symmetric.io.data.writer.ConflictException: Detected conflict while executing INSERT on SYM_TABLE_RELOAD_REQUEST. The primary key data was: {TARGET_NODE_ID=000000, SOURCE_NODE_ID=70770093, TRIGGER_ID=DEV-1-2605_ICD9, ROUTER_ID=DEV-1-2605_Central_Router, CREATE_TIME=2016-09-21 11:25:04.470000000}. Failed to fallback.
    at org.jumpmind.symmetric.io.data.writer.DefaultDatabaseWriterConflictResolver.performFallbackToUpdate(DefaultDatabaseWriterConflictResolver.java:324)
    at org.jumpmind.symmetric.io.data.writer.DefaultTransformWriterConflictResolver.performFallbackToUpdate(DefaultTransformWriterConflictResolver.java:89)
    at org.jumpmind.symmetric.io.data.writer.DefaultDatabaseWriterConflictResolver.needsResolved(DefaultDatabaseWriterConflictResolver.java:68)
    at org.jumpmind.symmetric.io.data.writer.DatabaseWriter.write(DatabaseWriter.java:210)
    at org.jumpmind.symmetric.io.data.writer.DatabaseWriter.write(DatabaseWriter.java:167)
    at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64)
    at org.jumpmind.symmetric.model.ProcessInfoDataWriter.write(ProcessInfoDataWriter.java:65)
    at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64)
    at org.jumpmind.symmetric.io.data.writer.TransformWriter.write(TransformWriter.java:193)
    at org.jumpmind.symmetric.io.data.DataProcessor.forEachDataInTable(DataProcessor.java:194)
    at org.jumpmind.symmetric.io.data.DataProcessor.forEachTableInBatch(DataProcessor.java:164)
    at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:114)
    at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener.end(DataLoaderService.java:779)
    at org.jumpmind.symmetric.io.data.writer.StagingDataWriter.notifyEndBatch(StagingDataWriter.java:75)
    at org.jumpmind.symmetric.io.data.writer.AbstractProtocolDataWriter.end(AbstractProtocolDataWriter.java:226)
    at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:124)
    at org.jumpmind.symmetric.service.impl.DataLoaderService.loadDataFromTransport(DataLoaderService.java:407)
    at org.jumpmind.symmetric.service.impl.DataLoaderService.loadDataFromPull(DataLoaderService.java:265)
    at org.jumpmind.symmetric.service.impl.PullService.execute(PullService.java:129)
    at org.jumpmind.symmetric.service.impl.NodeCommunicationService$2.run(NodeCommunicationService.java:307)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

And this is the SQL which is used for the 3.5.22 client

insert into "SYM_TABLE_RELOAD_REQUEST" ("TARGET_NODE_ID", "SOURCE_NODE_ID", "TRIGGER_ID", "ROUTER_ID", "CREATE_TIME", "RELOAD_SELECT", "RELOAD_TIME", "LAST_UPDATE_BY", "LAST_UPDATE_TIME") values (?,?,?,?,?,?,?,?,?)

And this is the SqlException occurring

org.jumpmind.db.sql.UniqueKeyException: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (SYMMETRIC_2605.SYS_C002043798) violated


Steps To Reproduce1. Central is at 3.8.4
2. Client is at 3.5.22
3. Send table request from Central to Client
4. Multiple requests cause issue
Tagsinitial/partial load

Activities

josh-a-hicks

2016-09-30 13:53

developer   ~0000868

It appears to be a truncation issue during insert and then when fallback fires it uses the full precision and can not find a match.

We are looking into the fix but in the meantime you should be able to create your reload requests with a precision only down to the seconds or set milliseconds to all 0.

rwfuller

2016-09-30 15:19

reporter   ~0000886

I will try that and let you know. So it does not appear to be the addition of CREATE_TIME as a primary key when older versions do not have that as a primary key?

emiller

2024-02-28 18:59

developer   ~0002414

Versions older than 3.8 have reached end of life.

Issue History

Date Modified Username Field Change
2016-09-22 15:25 rwfuller New Issue
2016-09-30 01:01 admin Status new => closed
2016-09-30 13:51 josh-a-hicks Assigned To => josh-a-hicks
2016-09-30 13:51 josh-a-hicks Status closed => feedback
2016-09-30 13:51 josh-a-hicks Resolution open => reopened
2016-09-30 13:53 josh-a-hicks Note Added: 0000868
2016-09-30 15:19 rwfuller Note Added: 0000886
2016-09-30 15:19 rwfuller Status feedback => assigned
2019-04-24 13:19 elong Tag Attached: initial/partial load
2024-02-28 18:59 emiller Status assigned => closed
2024-02-28 18:59 emiller Note Added: 0002414