You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/02/23 02:31:22 UTC

[GitHub] [shardingsphere] ReyYang commented on a change in pull request #15565: For #15541: FinishCheckJob will pass data consistency check when target table is not empty.

ReyYang commented on a change in pull request #15565:
URL: https://github.com/apache/shardingsphere/pull/15565#discussion_r812515787



##########
File path: shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/job/FinishedCheckJob.java
##########
@@ -93,6 +99,19 @@ public void execute(final ShardingContext shardingContext) {
         }
     }
     
+    private boolean checkJobStatus(final String jobId) {
+        Map<Integer, JobProgress> jobProgressMap = ruleAlteredJobAPI.getProgress(jobId);
+        final AtomicBoolean flag = new AtomicBoolean(false);
+        for (JobProgress each : jobProgressMap.values()) {
+            if (JobStatus.FINISHED.equals(each.getStatus()) || JobStatus.PREPARING_FAILURE.equals(each.getStatus())
+                    || JobStatus.EXECUTE_INVENTORY_TASK_FAILURE.equals(each.getStatus()) || JobStatus.EXECUTE_INCREMENTAL_TASK_FAILURE.equals(each.getStatus())) {
+                flag.set(true);
+                break;
+            }
+        }

Review comment:
       - The judgment here should include all jobStatus because it is possible to get an exception before incrementalTask.
   - JobProgress has added judgment NULL




-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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