Skip to content

Commit d8e636d

Browse files
author
xuchao
committed
Merge branch 'hotfix_1.8_release_3.10.x_31609' into 1.8_release_4.0.x
2 parents 0d07c94 + 3cb7996 commit d8e636d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

flinkx-rdb/flinkx-rdb-reader/src/main/java/com.dtstack.flinkx.rdb.inputformat/JdbcInputFormat.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,11 @@ protected void initMetric(InputSplit inputSplit) {
341341
//endLocation设置为数据库中查询的最大值
342342
String endLocation = ((JdbcInputSplit) inputSplit).getEndLocation();
343343
endLocationAccumulator.add(new BigInteger(StringUtil.stringToTimestampStr(endLocation, type)));
344+
}else{
345+
//增量任务,且useMaxFunc设置为false,如果startLocation不为空,则将endLocation初始值设置为startLocation的值,防止数据库无增量数据时下次获取到的startLocation为空
346+
if (StringUtils.isNotEmpty(startLocation)) {
347+
endLocationAccumulator.add(new BigInteger(startLocation));
348+
}
344349
}
345350

346351
//将累加器信息添加至prometheus

0 commit comments

Comments
 (0)