zhangmeng916 commented on a change in pull request #1124:
URL: https://github.com/apache/helix/pull/1124#discussion_r458934261
##########
File path:
helix-core/src/main/java/org/apache/helix/controller/stages/MessageGenerationPhase.java
##########
@@ -188,14 +196,21 @@ private void generateMessage(final Resource resource,
final BaseControllerDataPr
if (pendingMessage != null &&
shouldCleanUpPendingMessage(pendingMessage, currentState,
currentStateOutput.getEndTime(resourceName, partition,
instanceName))) {
- LogUtil.logInfo(logger, _eventId, String.format(
- "Adding pending message %s on instance %s to clean up. Msg:
%s->%s, current state of resource %s:%s is %s",
- pendingMessage.getMsgId(), instanceName,
pendingMessage.getFromState(),
- pendingMessage.getToState(), resourceName, partition,
currentState));
- if (!pendingMessagesToCleanUp.containsKey(instanceName)) {
- pendingMessagesToCleanUp.put(instanceName, new HashMap<String,
Message>());
+ logAndAddToCleanUp(messagesToCleanUp, pendingMessage, instanceName,
resourceName,
+ partition, currentState, PENDING_MESSAGE);
+ }
+
+ for (Message staleMessage : staleMessages) {
+ if (staleMessage == null) {
+ logger.warn("Should not contain a stale message as null");
Review comment:
Shouldn't be possible. Removed.
----------------------------------------------------------------
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]