View Issue Details

IDProjectCategoryView StatusLast Update
0004996SymmetricDSBugpublic2021-05-28 20:40
Reporterelong Assigned Toelong  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.12.1 
Target Version3.12.10Fixed in Version3.12.10 
Summary0004996: Table PK column order mismatch with column order can cause errors
DescriptionThe internal data model for a table returns columns in their natural order, but it returns primary keys in the order based on the PK index. The difference in order can cause trouble for callers, such as the auto resolver that chooses a winner when rows are in conflict. Issue 0004421 changed the order so tables can be created with the columns in one order and primary keys columns ordered differently in the PK index. This issue will make the order match for getColumns() and getPrimaryKeyColumns(). Instead, a new getPrimaryKeyColumnsInIndexOrder() method will be added that callers can use when that order is required, such as the DdlBuilders.

2021-05-15 14:42:50,084 INFO [central] [DefaultDatabaseWriter] [central-dataloader-11497] Failed to process delete event in batch 50-289105 on channel 'default'.
 StackTraceKey.init [RuntimeException:2433083009] java.lang.RuntimeException: Could not convert a value of for column pay_num of type BIGINT
    at org.jumpmind.db.platform.AbstractDatabasePlatform.getObjectValues(AbstractDatabasePlatform.java:400)
    at org.jumpmind.db.platform.AbstractDatabasePlatform.getObjectValues(AbstractDatabasePlatform.java:383)
    at org.jumpmind.symmetric.io.data.writer.DefaultDatabaseWriterConflictResolver.isCaptureTimeNewer(DefaultDatabaseWriterConflictResolver.java:149)
    at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriterConflictResolver.needsResolved(AbstractDatabaseWriterConflictResolver.java:149)
    at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriter.write(AbstractDatabaseWriter.java:216)
    at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64)
    at org.jumpmind.symmetric.model.ProcessInfoDataWriter.write(ProcessInfoDataWriter.java:84)
    at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64)
    at org.jumpmind.symmetric.io.data.writer.TransformWriter.write(TransformWriter.java:202)
    at org.jumpmind.symmetric.io.data.DataProcessor.forEachDataInTable(DataProcessor.java:212)
    at org.jumpmind.symmetric.io.data.DataProcessor.forEachTableInBatch(DataProcessor.java:178)
    at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:124)
    at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener$2.call(DataLoaderService.java:1091)
    at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener$2.call(DataLoaderService.java:1067)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NumberFormatException
    at java.math.BigDecimal.<init>(BigDecimal.java:596)
    at java.math.BigDecimal.<init>(BigDecimal.java:383)
    at java.math.BigDecimal.<init>(BigDecimal.java:806)
    at org.jumpmind.db.platform.AbstractDatabasePlatform.parseBigInteger(AbstractDatabasePlatform.java:501)
    at org.jumpmind.db.platform.AbstractDatabasePlatform.getObjectValue(AbstractDatabasePlatform.java:434)
    at org.jumpmind.db.platform.AbstractDatabasePlatform.getObjectValues(AbstractDatabasePlatform.java:395)
    ... 17 more
Tagsddl/schema

Relationships

related to 0004421 closedjosh-a-hicks Primary key ordering based on the sequence of the PK 

Activities

There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.12 60a4b733

2021-05-21 17:41:32

admin

Details Diff
0004996: Table PK column order mismatch with column order can cause
errors
Affected Issues
0004996
mod - symmetric-db/src/main/java/org/jumpmind/db/alter/ModelComparator.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/model/Table.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/AbstractDdlBuilder.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/firebird/FirebirdDdlBuilder.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/mssql/MsSql2000DdlBuilder.java Diff File

Issue History

Date Modified Username Field Change
2021-05-19 16:51 elong New Issue
2021-05-19 16:51 elong Status new => assigned
2021-05-19 16:51 elong Assigned To => elong
2021-05-19 16:51 elong Tag Attached: ddl/schema
2021-05-19 16:52 elong Relationship added related to 0004421
2021-05-21 17:41 elong Status assigned => resolved
2021-05-21 17:41 elong Resolution open => fixed
2021-05-21 17:41 elong Fixed in Version => 3.12.10
2021-05-21 18:00 admin Changeset attached => SymmetricDS 3.12 60a4b733
2021-05-28 20:40 admin Status resolved => closed