View Issue Details

IDProjectCategoryView StatusLast Update
0006155SymmetricDSBugpublic2023-12-12 20:00
Reporteremiller Assigned Toemiller  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.14.0 
Target Version3.15.2Fixed in Version3.15.2 
Summary0006155: Conflict resolver does not handle unique index violations correctly when a unique index ignores null values
DescriptionWhen there are multiple unique indexes on a table and at least one of them ignores null values, the conflict resolver can end up deleting rows that should not be deleted. The steps to reproduce below explain how this issue can occur.

To prevent this from happening, add a startup parameter that determines whether SymmetricDS should delete rows that seem to be causing a unique index violation when the duplicate values are null. By default, SymmetricDS should not delete these rows.
Steps To Reproduce1. Create a table with two unique indexes, one of which ignores null values. One way of ignoring null values is via a filter condition on a SQL Server table.
2. Configure one-way replication for this table.
3. On the target node, insert a few rows that have null values for the column with the unique index that ignores null values.
4. On the source node, insert a row that has a null value for that same column and a value that will cause a unique index violation on a different column when synced to the target node.
5. See that all of the rows inserted during step 3 are incorrectly deleted.
TagsNo tags attached.

Relationships

related to 0005992 closedemiller Conflict resolver does not handle unique index violations correctly when a unique index ignores null values 

Activities

There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.15 ce7734d3

2023-12-12 19:43:20

evan-miller-jumpmind

Details Diff
0006155: Added parameter to adjust how the conflict resolver handles null values when resolving a unique index violation Affected Issues
0006155
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/common/ParameterConstants.java Diff File
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/load/AbstractDataLoaderFactory.java Diff File
mod - symmetric-core/src/main/resources/symmetric-default.properties Diff File
mod - symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/DatabaseWriterSettings.java Diff File
mod - symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/DefaultDatabaseWriterConflictResolver.java Diff File

Issue History

Date Modified Username Field Change
2023-12-12 19:33 emiller New Issue
2023-12-12 19:33 emiller Status new => assigned
2023-12-12 19:33 emiller Assigned To => emiller
2023-12-12 19:33 emiller Issue generated from: 0005992
2023-12-12 19:33 emiller Relationship added related to 0005992
2023-12-12 19:43 emiller Status assigned => resolved
2023-12-12 19:43 emiller Resolution open => fixed
2023-12-12 19:43 emiller Fixed in Version => 3.15.2
2023-12-12 20:00 Changeset attached => SymmetricDS 3.15 ce7734d3
2023-12-16 02:02 admin Status resolved => closed