You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/02/03 13:55:13 UTC

[GitHub] [kafka] ijuma commented on a change in pull request #10008: MINOR: Remove ZK dependency for coordinator topics' partition counts

ijuma commented on a change in pull request #10008:
URL: https://github.com/apache/kafka/pull/10008#discussion_r569430467



##########
File path: core/src/main/scala/kafka/coordinator/group/GroupMetadataManager.scala
##########
@@ -78,7 +76,7 @@ class GroupMetadataManager(brokerId: Int,
   private val shuttingDown = new AtomicBoolean(false)
 
   /* number of partitions for the consumer metadata topic */
-  private val groupMetadataTopicPartitionCount = getGroupMetadataTopicPartitionCount
+  private var groupMetadataTopicPartitionCount: Int = _

Review comment:
       If it's used by multiple threads and not set in the constructor, then it needs to be volatile. If it's only set in the constructor and there is at least one final field, then it would not need volatile.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org