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 2020/10/01 22:51:17 UTC

[GitHub] [helix] jiajunwang commented on a change in pull request #1362: Move ST message to state validation from executing phase to scheduling phase.

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



##########
File path: helix-core/src/main/java/org/apache/helix/messaging/handling/HelixStateTransitionHandler.java
##########
@@ -460,7 +438,33 @@ public void onError(Exception e, ErrorCode code, ErrorType type) {
       StateTransitionError error = new StateTransitionError(type, code, e);
       _stateModel.rollbackOnError(_message, _notificationContext, error);
     }
+  }
+
+  // Verify the fromState and current state of the stateModel.
+  public Exception staleMessageValidator() {

Review comment:
       nit, it would be more graceful to define a ValidationResult class and contain a boolean (pass or not) and an optional Exception. Especially as a public method. Is there a chance we can make it protected or package private?




----------------------------------------------------------------
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