You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/06/15 16:28:01 UTC

[GitHub] [kafka] ableegoldman commented on a change in pull request #8872: Fix log message for transition from standby to active

ableegoldman commented on a change in pull request #8872:
URL: https://github.com/apache/kafka/pull/8872#discussion_r440299033



##########
File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorStateManager.java
##########
@@ -509,11 +509,12 @@ void transitionTaskType(final TaskType newType, final LogContext logContext) {
             throw new IllegalStateException("Tried to recycle state for task type conversion but new type was the same.");
         }
 
+        TaskType oldType = taskType;
         taskType = newType;
         log = logContext.logger(ProcessorStateManager.class);
         logPrefix = logContext.logPrefix();
 
-        log.debug("Transitioning state manager for {} task {} to {}", taskType, taskId, newType);
+        log.debug("Transitioning state manager for {} task {} to {}", oldType, taskId, newType);

Review comment:
       I agree it would be useful to prefix the logs with `standby` or `active`, but I'd prefer to do that everywhere in a separate PR.
   
   Can we just move the log message to before we reassign `taskType = newType`? Or do you think we might forget/not notice that the ordering is relevant and accidentally move it back at some future time?




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