diff --git a/pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/impl/MLTransactionMetadataStoreProvider.java b/pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/impl/MLTransactionMetadataStoreProvider.java index 80f8927b682327..f774b8ee4350d9 100644 --- a/pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/impl/MLTransactionMetadataStoreProvider.java +++ b/pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/impl/MLTransactionMetadataStoreProvider.java @@ -38,7 +38,7 @@ public class MLTransactionMetadataStoreProvider implements TransactionMetadataSt private static final Logger log = LoggerFactory.getLogger(MLTransactionMetadataStoreProvider.class); - private static TxnLogBufferedWriterMetricsStats bufferedWriterMetrics = + private volatile static TxnLogBufferedWriterMetricsStats bufferedWriterMetrics = DisabledTxnLogBufferedWriterMetricsStats.DISABLED_BUFFERED_WRITER_METRICS; public static void initBufferedWriterMetrics(String brokerAdvertisedAddress){