kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: KAFKA-2913: missing partition check when removing groups from cache
Date Tue, 01 Dec 2015 05:33:49 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.9.0 94dc1f939 -> ca24692d1


KAFKA-2913: missing partition check when removing groups from cache

Author: Jason Gustafson <jason@confluent.io>

Reviewers: Guozhang Wang

Closes #605 from hachikuji/KAFKA-2913

(cherry picked from commit eafc349a1f26a20086b320916c2c819e05bc77ea)
Signed-off-by: Guozhang Wang <wangguoz@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/ca24692d
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/ca24692d
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/ca24692d

Branch: refs/heads/0.9.0
Commit: ca24692d168383e4e70c748f791e8382168f506b
Parents: 94dc1f9
Author: Jason Gustafson <jason@confluent.io>
Authored: Mon Nov 30 21:33:31 2015 -0800
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Mon Nov 30 21:33:45 2015 -0800

----------------------------------------------------------------------
 .../main/scala/kafka/coordinator/GroupMetadataManager.scala  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/ca24692d/core/src/main/scala/kafka/coordinator/GroupMetadataManager.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/coordinator/GroupMetadataManager.scala b/core/src/main/scala/kafka/coordinator/GroupMetadataManager.scala
index 167267f..f2ffa50 100644
--- a/core/src/main/scala/kafka/coordinator/GroupMetadataManager.scala
+++ b/core/src/main/scala/kafka/coordinator/GroupMetadataManager.scala
@@ -489,9 +489,11 @@ class GroupMetadataManager(val brokerId: Int,
 
         // clear the groups for this partition in the cache
         for (group <- groupsCache.values) {
-          onGroupUnloaded(group)
-          groupsCache.remove(group.groupId, group)
-          numGroupsRemoved += 1
+          if (partitionFor(group.groupId) == offsetsPartition) {
+            onGroupUnloaded(group)
+            groupsCache.remove(group.groupId, group)
+            numGroupsRemoved += 1
+          }
         }
       }
 


Mime
View raw message