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



##########
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:
       Wonder if this needs `@volatile`.  It is only set once, upon invoking 
`startup()`, at which time it changes from 0 to the partition count.  The only 
place this value is used is in `partitionFor()` where it is the denominator and 
will cause division-by-zero if the original value is read instead of the 
updated value.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to