Skip to content

Commit

Permalink
[apache/helix] -- Added logic to Request for complete resource config…
Browse files Browse the repository at this point in the history
… refresh, when a workflow is explicitly marked as DELETED.
  • Loading branch information
himanshukandwal committed Nov 8, 2024
1 parent 92c549a commit 7b2b6e5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import java.util.TimeZone;

import com.google.common.collect.Lists;
import org.apache.helix.HelixConstants;
import org.apache.helix.HelixDataAccessor;
import org.apache.helix.HelixManager;
import org.apache.helix.HelixProperty;
Expand Down Expand Up @@ -77,6 +78,8 @@ public void updateWorkflowStatus(String workflow, WorkflowConfig workflowCfg,
LOG.debug("Workflow is marked as deleted {} cleaning up the workflow context.", workflow);
updateInflightJobs(workflow, workflowCtx, currentStateOutput, bestPossibleOutput);
cleanupWorkflow(workflow);
// Request for complete resource config refresh, when a workflow is explicitly marked as DELETED.
_clusterDataCache.notifyDataChange(HelixConstants.ChangeType.RESOURCE_CONFIG);
return;
}

Expand Down Expand Up @@ -525,8 +528,6 @@ private void cleanupWorkflow(String workflow) {
// clean all the contexts even if Configs and IdealStates are exists. Then all the workflows
// and jobs will rescheduled again.
removeContexts(workflow, jobs, _clusterDataCache.getTaskDataCache());
// Request for full-data refresh to re-fetch workflow resource configs.
_clusterDataCache.requireFullRefresh();
}
} else {
LOG.info(
Expand Down

0 comments on commit 7b2b6e5

Please sign in to comment.