dajac commented on code in PR #14417: URL: https://github.com/apache/kafka/pull/14417#discussion_r1341655709
########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/runtime/CoordinatorRuntime.java: ########## @@ -1242,7 +1304,11 @@ public void scheduleLoadOperation( case FAILED: case INITIAL: context.transitionTo(CoordinatorState.LOADING); - loader.load(tp, context.coordinator).whenComplete((state, exception) -> { + loader.load(tp, context.coordinator).whenComplete((summary, exception) -> { + if (summary != null) { + log.debug("Finished loading tp={}, LoadSummary={}", tp, summary); + runtimeMetrics.partitionLoadSensor.record(summary.loadTimeMs(), summary.endTimeMs(), false); Review Comment: 2. My point was more about the fact that partitionLoadSensor may or may not be initialized based on the current organization of the code so this could be a source of NPE. -- 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