alirezazamani 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_r332658541
##########
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:
Fixed. Thanks for the comment.
----------------------------------------------------------------
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]