This is an automated email from the ASF dual-hosted git repository.
chia7712 pushed a commit to branch 4.0
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/4.0 by this push:
new 0deeb8f8c86 MINOR: Ensure proper visibility of attribute accesses
across threads (#21023)
0deeb8f8c86 is described below
commit 0deeb8f8c86ff80f72a6aef0b1065162915d3ec3
Author: majialong <[email protected]>
AuthorDate: Mon Dec 1 16:45:30 2025 +0800
MINOR: Ensure proper visibility of attribute accesses across threads
(#21023)
backport https://github.com/apache/kafka/pull/21014.
In 4.0, `MetadataImage` has not yet been introduced into
`GroupCoordinatorService`. Therefore, this patch only includes changes
to `CoordinatorRuntime`.
Reviewers: Chia-Ping Tsai <[email protected]>
---
.../org/apache/kafka/coordinator/common/runtime/CoordinatorRuntime.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/coordinator-common/src/main/java/org/apache/kafka/coordinator/common/runtime/CoordinatorRuntime.java
b/coordinator-common/src/main/java/org/apache/kafka/coordinator/common/runtime/CoordinatorRuntime.java
index 51ce267da2e..ad5f76a468d 100644
---
a/coordinator-common/src/main/java/org/apache/kafka/coordinator/common/runtime/CoordinatorRuntime.java
+++
b/coordinator-common/src/main/java/org/apache/kafka/coordinator/common/runtime/CoordinatorRuntime.java
@@ -571,7 +571,7 @@ public class CoordinatorRuntime<S extends
CoordinatorShard<U>, U> implements Aut
/**
* The current state.
*/
- CoordinatorState state;
+ volatile CoordinatorState state;
/**
* The current epoch of the coordinator. This represents