mjsax commented on code in PR #22748:
URL: https://github.com/apache/kafka/pull/22748#discussion_r3555718700
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -4307,6 +4321,52 @@ private UpdateTargetAssignmentResult<Assignment>
maybeUpdateTargetAssignment(
}
}
+ /**
+ * How a streams-group heartbeat updates the group epoch and target
assignment.
+ * <ul>
+ * <li>{@code NONE} - nothing changed; the group epoch is not
bumped.</li>
+ * <li>{@code RECOMPUTE} - the group changed (membership, topology or
configuration); bump the group epoch and re-run the
+ * assignor to produce a new final target assignment.</li>
+ * <li>{@code REFINE} - a warm-up task has caught up; bump the group
epoch to advance the in-memory refinement one step
+ * WITHOUT re-running the assignor (the final target assignment is
unchanged).</li>
+ * </ul>
+ */
+ private enum AssignmentUpdate {
+ NONE,
+ RECOMPUTE,
+ REFINE
+ }
+
+ /**
+ * Returns whether at least one currently-assigned warm-up task has caught
up, i.e. its lag (reported end-offset minus reported
+ * offset) is within the acceptable recovery lag and it is therefore ready
to be promoted to active.
+ *
+ * @param group The streams group.
+ * @param acceptableRecoveryLag The lag threshold below which a warm-up is
considered caught up.
+ * @return true if at least one assigned warm-up task is caught up.
+ */
+ private boolean hasHotWarmupTask(StreamsGroup group, long
acceptableRecoveryLag) {
Review Comment:
Yes, this PR is lacking tests -- I wanted to get early feedback first, to
make sure I am heading into the right direction.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]