You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by "meethngala (via GitHub)" <gi...@apache.org> on 2023/02/08 21:18:43 UTC

[GitHub] [gobblin] meethngala commented on a diff in pull request #3639: [GOBBLIN-1782] Fix Merge State for Flow Pending Resume statuses

meethngala commented on code in PR #3639:
URL: https://github.com/apache/gobblin/pull/3639#discussion_r1100689394


##########
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/KafkaJobStatusMonitor.java:
##########
@@ -251,10 +251,17 @@ static void addJobStatusToStateStore(org.apache.gobblin.configuration.State jobS
         int currentGeneration = jobStatus.getPropAsInt(TimingEvent.FlowEventConstants.CURRENT_GENERATION_FIELD, previousGeneration);
         int previousAttempts = previousJobStatus.getPropAsInt(TimingEvent.FlowEventConstants.CURRENT_ATTEMPTS_FIELD, 1);
         int currentAttempts = jobStatus.getPropAsInt(TimingEvent.FlowEventConstants.CURRENT_ATTEMPTS_FIELD, previousAttempts);
+        // Verify if the current job status is flow status. If yes, we check for its current execution status to be PENDING_RESUME (limiting to just resume flow statuses)
+        // When the above two conditions satisfy, we NEED NOT check for the out-of-order events since GaaS would manage the lifecycle of these events
+        // Hence, we update the merge state so that the flow can proceed with its execution
+        if (jobName != null && jobGroup != null
+            && jobName.equals(JobStatusRetriever.NA_KEY) && jobGroup.equals(JobStatusRetriever.NA_KEY) && currentStatus.equals(ExecutionStatus.PENDING_RESUME.name())) {

Review Comment:
   yeah for sure! I have abstracted the logic to check for flow statuses and in pending resume in my latest commit. Regarding the second comment, I have added the logic for currentStatus != pending resume in the abstracted method itself... so that in case we want to extend it to other status types in the future we can just do it in the method and not change the if condition often... wdyt?



-- 
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: dev-unsubscribe@gobblin.apache.org

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