From 4fae41d4c73f8b6c403c9938493165ca0b7a55dc Mon Sep 17 00:00:00 2001 From: zhangliang Date: Tue, 14 Jan 2025 21:02:56 +0800 Subject: [PATCH] Add @ThreadSafe on MetaDataContexts --- .../apache/shardingsphere/mode/metadata/MetaDataContexts.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/MetaDataContexts.java b/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/MetaDataContexts.java index a16e6b0b05397..f885253ef9991 100644 --- a/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/MetaDataContexts.java +++ b/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/MetaDataContexts.java @@ -20,11 +20,13 @@ import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData; import org.apache.shardingsphere.infra.metadata.statistics.ShardingSphereStatistics; +import javax.annotation.concurrent.ThreadSafe; import java.util.concurrent.atomic.AtomicReference; /** * Meta data contexts. */ +@ThreadSafe public final class MetaDataContexts { private final AtomicReference metaData = new AtomicReference<>();