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_r331846167
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/task/TaskDriver.java
 ##########
 @@ -388,11 +389,19 @@ public void enqueueJobs(final String queue, final 
List<String> jobs,
       // if queue is full, Helix will try to clean up the expired job to free 
more space.
       WorkflowContext workflowContext = 
TaskUtil.getWorkflowContext(_propertyStore, queue);
       if (workflowContext != null) {
-        Set<String> expiredJobs =
-            TaskUtil.getExpiredJobs(_accessor, _propertyStore, workflowConfig, 
workflowContext);
+        Set<String> expiredJobs = Sets.newHashSet();
+        Set<String> jobsWithoutConfig = Sets.newHashSet();
+        TaskUtil.getExpiredJobs(_accessor, _propertyStore, workflowConfig, 
workflowContext,
+            expiredJobs, jobsWithoutConfig);
         if (!TaskUtil.removeJobsFromWorkflow(_accessor, _propertyStore, queue, 
expiredJobs, true)) {
           LOG.warn("Failed to clean up expired and completed jobs from queue " 
+ queue);
         }
+
+        if (!TaskUtil.removeJobsFromWorkflow(_accessor, _propertyStore, queue, 
jobsWithoutConfig,
+            true)) {
+          LOG.warn("Failed to clean up jobsWithoutConfig jobs from queue {}" , 
queue);
+        }
+
 
 Review comment:
   Extra space?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org
For additional commands, e-mail: reviews-h...@helix.apache.org

Reply via email to