chia7712 commented on code in PR #23341:
URL: https://github.com/apache/kafka/pull/23341#discussion_r3935477529
##########
clients/src/main/java/org/apache/kafka/common/requests/StreamsGroupHeartbeatRequest.java:
##########
@@ -49,6 +51,16 @@ public StreamsGroupHeartbeatRequest build(short version) {
// TaskOffsets/TaskEndOffsets are only supported by brokers
supporting v1+ request versions
data.setTaskOffsets(null);
data.setTaskEndOffsets(null);
+ // A v0 coordinator rejects a heartbeat that reports an owned
warm-up task, so a member that
+ // holds one after downgrading to v0 must report none. Unlike
the two fields above, null is
+ // not a safe unconditional value here: it means "unchanged",
but a v0 coordinator separately
+ // requires the three owned-task lists to be all null or all
non-null, and active/standby tasks stay
+ // null on the very same heartbeats where warmup tasks would.
So this only clears the list when it is
+ // non-null, i.e. only on a heartbeat that is (re-)sending the
assignment this round -- the same
+ // heartbeats where active/standby tasks are non-null too.
+ if (data.warmupTasks() != null) {
Review Comment:
Have we documented this in the RPC file
(`StreamsGroupHeartbeatRequest.json`)?
--
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]