Hisoka-X commented on code in PR #2472:
URL:
https://github.com/apache/incubator-seatunnel/pull/2472#discussion_r959368702
##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/scheduler/PipelineBaseScheduler.java:
##########
@@ -56,18 +68,22 @@ public void startScheduling() {
handlePipelineStateUpdateError(pipeline,
PipelineState.SCHEDULED);
return null;
}
- if (!applyResourceForPipeline(pipeline)) {
- return null;
+ Map<PhysicalVertex, SlotProfile> slotProfiles;
+ try {
+ slotProfiles = applyResourceForPipeline(pipeline);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
}
+ pipeline.whenComplete((state, error) ->
releasePipelineResource(Lists.newArrayList(slotProfiles.values())));
Review Comment:
If like this, when retry task, should request resource again, this is not
acceptable
--
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]