[ https://issues.apache.org/jira/browse/HELIX-681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16408164#comment-16408164 ]
ASF GitHub Bot commented on HELIX-681: -------------------------------------- Github user lei-xia commented on a diff in the pull request: https://github.com/apache/helix/pull/152#discussion_r176144284 --- Diff: helix-core/src/main/java/org/apache/helix/util/HelixUtil.java --- @@ -219,4 +220,22 @@ public static String serializeByComma(List<String> objects) { return idealStateMap; } + + /** + * Remove the given message from ZK using the given accessor. This function will + * not throw exception + * @param accessor HelixDataAccessor + * @param msg message to remove + * @param instanceName name of the instance on which the message sits + * @return true if success else false + */ + public static boolean removeMessageFromZK(HelixDataAccessor accessor, Message msg, + String instanceName) { + try { + return accessor.removeProperty(msg.getKey(accessor.keyBuilder(), instanceName)); + } catch (Exception e) { --- End diff -- Do we throw NoNodeException here, if there is, NoNodeException should be treated as success? > Participant should not fail state transition on fail to delete / relay message > ------------------------------------------------------------------------------ > > Key: HELIX-681 > URL: https://issues.apache.org/jira/browse/HELIX-681 > Project: Apache Helix > Issue Type: Bug > Reporter: Hao Zhang > Priority: Major > > Currently we have a general try-catch block in HelixTask and > HelixTaskExecutor, which, upon any exception thrown from state transition > routine, will fail state transition. However there are at least the following > cases in which state transition should be considered as successful: > * When we fail to delete message after successfully handled message and > updated current state -> this is because we already completed state > transition and current state is consistent between participant and ZK > * When we fail to send out relay message > as relay message provides only > best effort of delivering messages, which has nothing to do with state > transition's results. In case of fail to relay message, controller will > resend message which ensures correctness. -- This message was sent by Atlassian JIRA (v7.6.3#76005)