diff --git a/core/src/main/scala/kafka/coordinator/group/GroupMetadata.scala b/core/src/main/scala/kafka/coordinator/group/GroupMetadata.scala index 547a3e6965..59bdadb631 100644 --- a/core/src/main/scala/kafka/coordinator/group/GroupMetadata.scala +++ b/core/src/main/scala/kafka/coordinator/group/GroupMetadata.scala @@ -846,6 +846,7 @@ private[group] class GroupMetadata(val groupId: String, initialState: GroupState debug(s"Expired offsets from group '$groupId': ${expiredOffsets.keySet}") offsets --= expiredOffsets.keySet + expiredOffsets.keySet.foreach(removeOffsetMetric) expiredOffsets }