nzw921rx commented on code in PR #13209:
URL: https://github.com/apache/seatunnel/pull/13209#discussion_r4525155181
##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/checkpoint/operation/CheckpointBarrierTriggerOperation.java:
##########
@@ -67,41 +64,37 @@ protected void readInternal(ObjectDataInput in) throws
IOException {
barrier = in.readObject();
}
+ /**
+ * Hands the barrier to the target task on this worker.
+ *
+ * <p>No task of a pipeline starts before every task has reported that it
is ready, so when a
+ * barrier exists, its target task group is already registered on this
worker. If it cannot be
+ * found, that deployment has ended. The barrier is not retried: a
pipeline restore deploys a
+ * new task group at the same location, and a retried barrier would reach
that deployment, which
+ * belongs to a new checkpoint coordinator and never completes this
checkpoint.
+ */
@Override
public void runInternal() throws Exception {
SeaTunnelServer server = getService();
- RetryUtils.retryWithException(
- () -> {
- Task task =
- server.getTaskExecutionService()
-
.getExecutionContext(taskLocation.getTaskGroupLocation())
- .getTaskGroup()
- .getTask(taskLocation.getTaskID());
- task.getExecutionContext()
- .getTaskExecutionService()
- .asyncExecuteFunction(
- taskLocation.getTaskGroupLocation(),
- () -> {
- try {
- log.debug(
-
"CheckpointBarrierTriggerOperation [{}]",
- taskLocation);
- task.triggerBarrier(barrier);
- } catch (Exception e) {
- task.getExecutionContext()
- .sendToMaster(
- new
CheckpointErrorReportOperation(
-
taskLocation, e));
- }
- });
- return null;
- },
- new RetryUtils.RetryMaterial(
- Constant.OPERATION_RETRY_TIME,
- true,
- exception ->
- exception instanceof
TaskGroupContextNotFoundException
- &&
!server.taskIsEnded(taskLocation.getTaskGroupLocation()),
- Constant.OPERATION_RETRY_SLEEP));
+ Task task =
+ server.getTaskExecutionService()
Review Comment:
If the retry logic is retained, how to identify whether a task group that
has already been restored is a good direction? Trying again in the case of
network jitter has clear value
--
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]