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/08 03:53:43 UTC

[GitHub] [kafka] chia7712 commented on a change in pull request #10080: MINOR: KafkaBroker.brokerState should be volatile instead of AtomicReference

chia7712 commented on a change in pull request #10080:
URL: https://github.com/apache/kafka/pull/10080#discussion_r571766669



##########
File path: core/src/main/scala/kafka/server/KafkaBroker.scala
##########
@@ -71,8 +70,11 @@ object KafkaBroker {
 }
 
 trait KafkaBroker extends KafkaMetricsGroup {
+  @volatile private var _brokerState: BrokerState = BrokerState.NOT_RUNNING

Review comment:
       Why not using ```@volatile var brokerState: BrokerState = BrokerState.NOT_RUNNING```? 




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