You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "zhangshenghang (via GitHub)" <gi...@apache.org> on 2026/02/01 14:00:52 UTC

Re: [PR] [Improve][Core] Update metric path references to include sink and source indices for accurate assertions [seatunnel]

zhangshenghang commented on code in PR #10304:
URL: https://github.com/apache/seatunnel/pull/10304#discussion_r2751274326


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/resourcemanager/ResourceRequestHandler.java:
##########
@@ -285,14 +307,32 @@ private void applyByDynamicWorker(Map<String, String> tags) {
     }
 
     private void releaseAllResourceInternal() {
-        LOGGER.warning("apply resource not success, release all already applied resource");
-        new ArrayList<>(resultSlotProfiles.keySet())
+        int appliedCount = resultSlotProfiles.size();
+        int requiredCount = resourceProfile.size();
+
+        String slotIds =
+                resultSlotProfiles.values().stream()
+                        .map(
+                                slot ->
+                                        String.format(
+                                                "Slot-%d@%s", slot.getSlotID(), slot.getWorker()))
+                        .collect(Collectors.joining(", "));
+
+        LOGGER.warning(
+                String.format(
+                        "Apply resource not success for job: %d, required: %d slots, applied: %d slots, "
+                                + "releasing slots: [%s], remaining: %d slots not assigned",
+                        jobId, requiredCount, appliedCount, slotIds, requiredCount - appliedCount));
+
+        resultSlotProfiles.values().stream()
+                .filter(Objects::nonNull)
                 .forEach(
-                        index -> {
-                            SlotProfile profile = resultSlotProfiles.remove(index);
-                            if (profile != null) {
-                                resourceManager.releaseResource(jobId, profile);
-                            }
+                        profile -> {
+                            LOGGER.fine(
+                                    String.format(
+                                            "Releasing slot %d for job %d from worker %s",
+                                            profile.getSlotID(), jobId, profile.getWorker()));
+                            resourceManager.releaseResource(jobId, profile);

Review Comment:
   > lack `resultSlotProfiles.remove`
   
   Done



-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org