Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
0003646: Auto resolve foreign key can fail on Oracle RAC in noorder mode
  • Loading branch information
erilong committed Jul 25, 2018
1 parent 5cf93c7 commit 79776dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Expand Up @@ -113,7 +113,7 @@ public BatchAckResult ack(final BatchAck batch) {
if (!batch.isOk() && batch.getErrorLine() != 0) {
String sql = getSql("selectDataIdSql");
if (parameterService.is(ParameterConstants.DBDIALECT_ORACLE_SEQUENCE_NOORDER, false)) {
sql += getSql("orderByCreateTime");
sql = getSql("selectDataIdByCreateTimeSql");
} else if (parameterService.is(ParameterConstants.ROUTING_DATA_READER_ORDER_BY_DATA_ID_ENABLED, true)) {
sql += getSql("orderByDataId");
}
Expand Down
Expand Up @@ -30,10 +30,12 @@ public AcknowledgeServiceSqlMap(IDatabasePlatform platform,
Map<String, String> replacementTokens) {
super(platform, replacementTokens);
putSql("selectDataIdSql", "select data_id from $(data_event) b where batch_id = ?");


putSql("selectDataIdByCreateTimeSql",
"select d.data_id from $(data) d " +
"inner join $(data_event) e on d.data_id = e.data_id where e.batch_id = ? order by d.create_time asc, d.data_id asc");

putSql("orderByDataId", " order by data_id asc");

putSql("orderByCreateTime", " order by create_time asc, data_id asc ");

}

Expand Down

0 comments on commit 79776dc

Please sign in to comment.