det101 commented on code in PR #18003:
URL: 
https://github.com/apache/dolphinscheduler/pull/18003#discussion_r2992021090


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/executor/workflow/BackfillWorkflowExecutorDelegate.java:
##########
@@ -98,10 +117,12 @@ private List<Integer> doParallelBackfillWorkflow(final 
BackfillWorkflowDTO backf
 
         log.info("In parallel mode, current expectedParallelismNumber: {}", 
expectedParallelismNumber);
         final List<Integer> workflowInstanceIdList = Lists.newArrayList();
-        for (List<ZonedDateTime> stringDate : splitDateTime(listDate, 
expectedParallelismNumber)) {
-            final Integer workflowInstanceId = doBackfillWorkflow(
-                    backfillWorkflowDTO,
-                    
stringDate.stream().map(DateUtils::dateToString).collect(Collectors.toList()));
+        final Set<Long> baseVisitedCodes = visitedCodes == null ? new 
HashSet<>() : visitedCodes;
+        for (List<ZonedDateTime> dateChunk : splitDateTime(listDate, 
expectedParallelismNumber)) {
+            // Each parallel chunk should keep its own traversal context to 
avoid cross-chunk pollution.
+            final Set<Long> chunkVisitedCodes = new 
HashSet<>(baseVisitedCodes);
+            final Integer workflowInstanceId =

Review Comment:
   Will not set 0



-- 
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]

Reply via email to