NealSun96 commented on a change in pull request #1326:
URL: https://github.com/apache/helix/pull/1326#discussion_r483271330
##########
File path:
helix-core/src/main/java/org/apache/helix/controller/stages/ResourceComputationStage.java
##########
@@ -130,11 +170,15 @@ public void process(ClusterEvent event) throws Exception {
resource.setStateModelFactoryName(currentState.getStateModelFactoryName());
resource.setBucketSize(currentState.getBucketSize());
resource.setBatchMessageMode(currentState.getBatchMessageMode());
- if (resource.getStateModelDefRef() == null && !isTaskCache
- || resource.getStateModelDefRef() != null && (
-
resource.getStateModelDefRef().equals(TaskConstants.STATE_MODEL_NAME) &&
isTaskCache
- ||
!resource.getStateModelDefRef().equals(TaskConstants.STATE_MODEL_NAME)
- && !isTaskCache)) {
+ if (!isTaskCache && (resource.getStateModelDefRef() == null
+ ||
!TaskConstants.STATE_MODEL_NAME.equals(resource.getStateModelDefRef()))) {
+ resourceToRebalance.put(resourceName, resource);
+ }
+
+ if (isTaskCache && TaskConstants.STATE_MODEL_NAME
+ .equals(resource.getStateModelDefRef())) {
+ // If a task current state exists without configs, it needs to
be cleaned up
+ taskResourcesToDrop.put(resourceName, resource);
Review comment:
It will get dropped. This is not a newly introduced logic: in the old
way before this PR, any job that doesn't have corresponding configs will be
assigned DROPPED.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]