nicktelford commented on code in PR #16922: URL: https://github.com/apache/kafka/pull/16922#discussion_r1818823335
########## streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorStateManager.java: ########## @@ -314,7 +348,7 @@ void initializeStoreOffsetsFromCheckpoint(final boolean storeDirIsEmpty) { } private void maybeRegisterStoreWithChangelogReader(final String storeName) { - if (isLoggingEnabled(storeName)) { + if (isLoggingEnabled(storeName) && changelogReader != null) { Review Comment: > This sort of thing makes me a bit nervous. At the very least, I think we should throw an exception if any of these methods are invoked on a ProcessorStateManager for an unassigned task with uninitialized fields. ########## streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorStateManager.java: ########## @@ -314,7 +348,7 @@ void initializeStoreOffsetsFromCheckpoint(final boolean storeDirIsEmpty) { } private void maybeRegisterStoreWithChangelogReader(final String storeName) { - if (isLoggingEnabled(storeName)) { + if (isLoggingEnabled(storeName) && changelogReader != null) { Review Comment: > This sort of thing makes me a bit nervous. At the very least, I think we should throw an exception if any of these methods are invoked on a ProcessorStateManager for an unassigned task with uninitialized fields. -- 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. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org