View Issue Details

IDProjectCategoryView StatusLast Update
0005239SymmetricDSBugpublic2022-08-05 19:33
Reporterelong Assigned Toelong  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.14.0 
Target Version3.14.0Fixed in Version3.14.0 
Summary0005239: Conflict resolution doesn't work if timestamp is in PK and different fractional second precision between databases
DescriptionIf the date/time column is in the primary key, then the query for the winner doesn’t work because it looks for a time with less precision. As a result, the incoming row always loads. This can lead to out-of-sync data if the outgoing row is actually the winner.

Source and Target Data:
1970-01-01 01:00:00.123 → 1970-01-01 01:00:00.123000

Target Capture Log:
"1970-01-01 01:00:00.123000"

Query on Target:
select create_time from sym_data
where table_name = ‘mytable’ and pk_data = '"1970-01-01 01:00:00.123"'

Potential Solution:
select create_time from sym_data
where table_name = ‘mytable’ and pk_data like '"1970-01-01 01:00:00.123%"'

If the date/time column is in the primary key, the query for a winner doesn’t work because the extra precision won’t be found. As a result, the incoming row always loads. This can lead to out-of-sync data if the outgoing row is actually the winner.

Source and Target Data:
1970-01-01 01:00:00.123456 → 1970-01-01 01:00:00.123000

Target Capture Log:
"1970-01-01 01:00:00.123"

Current Query on Target:
select create_time from sym_data
where table_name = ‘mytable’ and pk_data = '"1970-01-01 01:00:00.123456"'

Potential Solution:
select create_time from sym_data
where table_name = ‘mytable’ and pk_data = "'1970-01-01 01:00:00.123"'
Tagsconflict manager

Relationships

related to 0002180 closedelong H2 timestamp format creates conflict against ORACLE timestamp format 
related to 0003724 closedelong Conflict detection with Timestamps between DB2 and Derby 

Activities

There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.14 468762b6

2022-04-26 17:13:02

admin

Details Diff
0005239: Conflict when timestamp in PK and different fractional second
precision between databases
Affected Issues
0005239
mod - symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/DefaultDatabaseWriterConflictResolver.java Diff File

Issue History

Date Modified Username Field Change
2022-03-14 19:25 elong New Issue
2022-03-14 19:25 elong Status new => assigned
2022-03-14 19:25 elong Assigned To => elong
2022-03-14 19:25 elong Tag Attached: conflict manager
2022-04-26 17:13 elong Status assigned => resolved
2022-04-26 17:13 elong Resolution open => fixed
2022-04-26 17:13 elong Fixed in Version => 3.14.0
2022-04-26 18:00 admin Changeset attached => SymmetricDS 3.14 468762b6
2022-07-27 18:59 admin Status resolved => closed
2022-08-02 18:59 elong Relationship added related to 0002180
2022-08-05 19:33 elong Relationship added related to 0003724