[
https://issues.apache.org/jira/browse/HELIX-681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16408436#comment-16408436
]
ASF GitHub Bot commented on HELIX-681:
--------------------------------------
Github user zhan849 commented on a diff in the pull request:
https://github.com/apache/helix/pull/152#discussion_r176204863
--- 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 --
it will not. the reason I did a general try-catch here is because I want to
keep removeProperty semantics (only return true/false) here, but we do have
leaked exception in underlying implementations of removeProperty()
> 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)