You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2021/05/03 19:16:23 UTC

[GitHub] [helix] jiajunwang commented on a change in pull request #1721: Remove the logic that disables the partitions which fails to be state-transited from the ERROR state.

jiajunwang commented on a change in pull request #1721:
URL: https://github.com/apache/helix/pull/1721#discussion_r625307742



##########
File path: helix-core/src/main/java/org/apache/helix/messaging/handling/HelixStateTransitionHandler.java
##########
@@ -263,11 +263,6 @@ void postHandleMessage() {
         _stateModel.rollbackOnError(_message, _notificationContext, error);
         _currentStateDelta.setState(partitionKey, HelixDefinedState.ERROR.toString());
         _stateModel.updateState(HelixDefinedState.ERROR.toString());
-
-        // if we have errors transit from ERROR state, disable the partition
-        if (_message.getFromState().equalsIgnoreCase(HelixDefinedState.ERROR.toString())) {
-          disablePartition();

Review comment:
       An ERROR partition that is reset without error won't be disabled. Only when the resetting fails, it is disabled.
   
   And I also think it is designed for extra cautious. However, if you think about this story, the only reason a partition becomes OFFLINE and disabled is that the admin tries to reset multiple times, and a latter attempt is successfully done. Meaning the Helix lib behaves differently according to how many times the reset is done to a partition. This is very confusing.
   
   Assuming Helix users are reasonable and they do the necessary checks in the ERROR -> OFFLINE ST to confirm the partition data is in good shape, then disabling the partition does not really help anyone.
   On the other hand, if we think ERROR -> OFFLINE ST is not safe and the application logic is not complete, why shall we trust the human validate logic?
   
   Overall, I think the validation should be the responsibility of ERROR -> OFFLINE ST. And if the check fails, the partition will remain in an ERROR state. So disabling it or not does not make difference.




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



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