Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -770,12 +770,18 @@ public boolean rejoinNeededOrPending() {
// we need to rejoin if we performed the assignment and metadata has changed;
// also for those owned-but-no-longer-existed partitions we should drop them as lost
if (assignmentSnapshot != null && !assignmentSnapshot.matches(metadataSnapshot)) {
log.info("Requesting to re-join the group and trigger rebalance since the assignment metadata has changed from {} to {}",
assignmentSnapshot, metadataSnapshot);

requestRejoin();
return true;
}

// we need to join if our subscription has changed since the last join
if (joinedSubscription != null && !joinedSubscription.equals(subscriptions.subscription())) {
log.info("Requesting to re-join the group and trigger rebalance since the subscription has changed from {} to {}",
joinedSubscription, subscriptions.subscription());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: fix alignment.


requestRejoin();
return true;
}
Expand Down Expand Up @@ -1436,6 +1442,10 @@ boolean matches(MetadataSnapshot other) {
return version == other.version || partitionsPerTopic.equals(other.partitionsPerTopic);
}

@Override
public String toString() {
return "(version" + version + ": " + partitionsPerTopic + ")";
}
}

private static class OffsetCommitCompletion {
Expand Down