Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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 @@ -365,7 +365,7 @@ private[group] class GroupMetadata(val groupId: String, initialState: GroupState
case None =>
clientId + GroupMetadata.MemberIdDelimiter + UUID.randomUUID().toString
case Some(instanceId) =>
instanceId + GroupMetadata.MemberIdDelimiter + currentStateTimestamp.get
instanceId + GroupMetadata.MemberIdDelimiter + UUID.randomUUID().toString
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,23 @@ class GroupCoordinatorTest {
assertEquals(Errors.FENCED_INSTANCE_ID, invalidHeartbeatResult)
}

@Test
def shouldGetDifferentStaticMemberIdAfterEachRejoin(): Unit = {
val initialResult = staticMembersJoinAndRebalance(leaderInstanceId, followerInstanceId)

val timeAdvance = 1
var lastMemberId = initialResult.leaderId
for (_ <- 1 to 5) {
EasyMock.reset(replicaManager)

val joinGroupResult = staticJoinGroup(groupId, JoinGroupRequest.UNKNOWN_MEMBER_ID,
leaderInstanceId, protocolType, protocols, clockAdvance = timeAdvance)
assertTrue(joinGroupResult.memberId.startsWith(leaderInstanceId.get))
assertNotEquals(lastMemberId, joinGroupResult.memberId)
lastMemberId = joinGroupResult.memberId
}
}

@Test
def testOffsetCommitDeadGroup() {
val memberId = "memberId"
Expand Down