Copilot commented on code in PR #61389:
URL: https://github.com/apache/doris/pull/61389#discussion_r2944098452
##########
fe/fe-core/src/main/java/org/apache/doris/job/offset/jdbc/JdbcSourceOffsetProvider.java:
##########
@@ -116,7 +116,11 @@ public Offset getNextOffset(StreamingJobProperties
jobProps, Map<String, String>
nextOffset.setSplits(snapshotSplits);
return nextOffset;
} else if (currentOffset != null && currentOffset.snapshotSplit()) {
- // snapshot to binlog
+ if (isSnapshotOnlyMode()) {
+ // snapshot-only mode: all splits done, signal job to stop
+ return null;
Review Comment:
`getNextOffset()` returns `null` in snapshot-only mode once all snapshot
splits are consumed. Callers like `StreamingInsertTask.before()` and
`StreamingMultiTblTask.before()` immediately call `runningOffset.toString()`
and pass the offset into `rewriteTvfParams(...)`, so a `null` offset would
trigger an NPE if a task is ever created in this state. Consider keeping
`getNextOffset()` non-null (and rely solely on `hasReachedEnd()` to stop
scheduling), or update the task implementations to explicitly handle a `null`
offset as a no-op/terminal condition.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]