diff --git a/sentinel-core/src/main/java/com/alibaba/csp/sentinel/Constants.java b/sentinel-core/src/main/java/com/alibaba/csp/sentinel/Constants.java index 2c5ade24..ba6e12d2 100755 --- a/sentinel-core/src/main/java/com/alibaba/csp/sentinel/Constants.java +++ b/sentinel-core/src/main/java/com/alibaba/csp/sentinel/Constants.java @@ -41,7 +41,7 @@ public final class Constants { public final static String TOTAL_IN_RESOURCE_NAME = "__total_inbound_traffic__"; public final static DefaultNode ROOT = new EntranceNode(new StringResourceWrapper(ROOT_ID, EntryType.IN), - Env.nodeBuilder.buildClusterNode()); + new ClusterNode()); /** * Statistics for {@link SystemRule} checking. diff --git a/sentinel-core/src/main/java/com/alibaba/csp/sentinel/Env.java b/sentinel-core/src/main/java/com/alibaba/csp/sentinel/Env.java index 31a69291..20538f3b 100755 --- a/sentinel-core/src/main/java/com/alibaba/csp/sentinel/Env.java +++ b/sentinel-core/src/main/java/com/alibaba/csp/sentinel/Env.java @@ -20,6 +20,13 @@ import com.alibaba.csp.sentinel.node.DefaultNodeBuilder; import com.alibaba.csp.sentinel.node.NodeBuilder; /** + * Sentinel Env. This class will trigger all initialization for Sentinel. + * + *
+ * NOTE: to prevent deadlocks, other classes' static code block or static field should + * NEVER refer to this class. + *
+ * * @author jialiang.linjl */ public class Env {