narendly commented on a change in pull request #497: Fix job purge logic for 
job without config
URL: https://github.com/apache/helix/pull/497#discussion_r331846797
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/task/TaskUtil.java
 ##########
 @@ -989,47 +988,65 @@ public static void purgeExpiredJobs(String workflow, 
WorkflowConfig workflowConf
     }
     long purgeInterval = workflowConfig.getJobPurgeInterval();
     long currentTime = System.currentTimeMillis();
-    final Set<String> expiredJobs = Sets.newHashSet();
+    Set<String> expiredJobs = Sets.newHashSet();
+    Set<String> jobsWithoutConfig = Sets.newHashSet();
     if (purgeInterval > 0 && workflowContext.getLastJobPurgeTime() + 
purgeInterval <= currentTime) {
-      
expiredJobs.addAll(TaskUtil.getExpiredJobs(manager.getHelixDataAccessor(),
-          manager.getHelixPropertyStore(), workflowConfig, workflowContext));
-      if (expiredJobs.isEmpty()) {
+      TaskUtil.getExpiredJobs(manager.getHelixDataAccessor(),
+          manager.getHelixPropertyStore(), workflowConfig, workflowContext, 
expiredJobs, jobsWithoutConfig);
+
+      if (expiredJobs.isEmpty() && jobsWithoutConfig.isEmpty()) {
 
 Review comment:
   I think instead of doing this, we should just deal with two things 
separately.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to