You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "jolshan (via GitHub)" <gi...@apache.org> on 2023/07/25 20:31:35 UTC

[GitHub] [kafka] jolshan commented on a diff in pull request #14090: KAFKA-14048; CoordinatorContext should be protected by a lock

jolshan commented on code in PR #14090:
URL: https://github.com/apache/kafka/pull/14090#discussion_r1274089957


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/runtime/CoordinatorRuntime.java:
##########
@@ -1187,63 +1230,62 @@ public void scheduleLoadOperation(
     ) {
         throwIfNotRunning();
         log.info("Scheduling loading of metadata from {} with epoch {}", tp, partitionEpoch);
+
         // Touch the state to make the runtime immediately aware of the new coordinator.
-        getOrCreateContext(tp);
+        maybeCreateContext(tp);
 
         scheduleInternalOperation("Load(tp=" + tp + ", epoch=" + partitionEpoch + ")", tp, () -> {
-            CoordinatorContext context = getOrCreateContext(tp);
-
-            if (context.state == CoordinatorState.FAILED) {
-                // When the coordinator has failed, we create a new context instead of

Review Comment:
   How have we addressed this? Are we clearing the timeline data structures? 



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org