View Issue Details

IDProjectCategoryView StatusLast Update
0004457SymmetricDSImprovementpublic2020-07-20 10:50
Reporterelong Assigned Toelong  
Status closedResolutionfixed 
Product Version3.12.0 
Target Version3.12.2Fixed in Version3.12.2 
Summary0004457: Batch conflict possible when blocking row has self referencing foreign key
DescriptionWhen a table has a foreign key reference to itself, and the source and target are out of sync, a batch can get a conflict error.

[DefaultDatabaseWriterConflictResolver] [main] Primary key violation on table TEST_DATALOADER_PARENT during UPDATE with batch 00000-10003. Attempting to correct.
[DefaultDatabaseWriterConflictResolver] [main] Child exists foreign key violation while correcting primary key violation. Attempting further corrections.
[DefaultDatabaseWriterConflictResolver] [main] Remove foreign row catalog 'ROOT' schema 'PUBLIC' foreign table name 'TEST_DATALOADER_PARENT' fk name 'FK_TEST_DATALOADER_PARENT_PID' where sql '"ID" = 10002' to correct table 'TEST_DATALOADER_PARENT' for column 'ID'
[DefaultDatabaseWriter] [main] Failed to process update event in batch 00000-10003 on channel 'default'.
Failed pk data was: "10002"
Failed row data was: "10001","update-pk2", Detected conflict while executing UPDATE on ROOT.PUBLIC.TEST_DATALOADER_PARENT. The primary key data was: {ID=10002}. Failed to fallback.
Steps To ReproduceUsing DatabaseWriterConflictTest:

        String firstId = insert(getNextId(), "update-pk1", null);
        String secondId = insert(getNextId(), "update-pk2", firstId);
        update(secondId, firstId, "update-pk2", null);
Tagsconflict manager


There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.12 2ac4afae

2020-06-26 17:35:02


Details Diff
0004457: Batch conflict possible when blocking row has self referencing
foreign key
Affected Issues
mod - symmetric-io/src/integrationTest/java/org/jumpmind/symmetric/io/data/writer/ Diff File
mod - symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/ Diff File

Issue History

Date Modified Username Field Change
2020-06-26 17:33 elong New Issue
2020-06-26 17:33 elong Status new => assigned
2020-06-26 17:33 elong Assigned To => elong
2020-06-26 17:33 elong Tag Attached: conflict manager
2020-06-26 17:35 elong Status assigned => resolved
2020-06-26 17:35 elong Resolution open => fixed
2020-06-26 17:35 elong Fixed in Version => 3.12.2
2020-06-26 18:00 admin Changeset attached => SymmetricDS 3.12 2ac4afae
2020-07-20 10:50 elong Status resolved => closed