diff --git a/sentinel-core/src/main/java/com/alibaba/csp/sentinel/context/ContextUtil.java b/sentinel-core/src/main/java/com/alibaba/csp/sentinel/context/ContextUtil.java
index 3da93330..9af5f762 100755
--- a/sentinel-core/src/main/java/com/alibaba/csp/sentinel/context/ContextUtil.java
+++ b/sentinel-core/src/main/java/com/alibaba/csp/sentinel/context/ContextUtil.java
@@ -47,12 +47,12 @@ public class ContextUtil {
/**
* Store the context in ThreadLocal for easy access.
*/
- private static ThreadLocal
- * Enter the invocation context. The context is ThreadLocal, meaning that
- * each thread has it's own {@link Context}. New context will be created if
- * current thread doesn't have one.
+ * Enter the invocation context, which marks as the entrance of an invocation chain.
+ * The context is wrapped with {@code ThreadLocal}, meaning that each thread has it's own {@link Context}.
+ * New context will be created if current thread doesn't have one.
*
- * A context will be related to a {@link EntranceNode}, which represents the entrance
- * of the invocation tree. New {@link EntranceNode} will be created if
+ * A context will be bound with an {@link EntranceNode}, which represents the entrance statistic node
+ * of the invocation chain. New {@link EntranceNode} will be created if
* current context does't have one. Note that same context name will share
* same {@link EntranceNode} globally.
*
- * Note that each distinct {@code origin} of {@code name} will lead to creating a new
- * {@link Node}, meaning that total {@link Node} created will be of:
* Same resource in different context will count separately, see {@link NodeSelectorSlot}.
*
- * Enter the invocation context. The context is ThreadLocal, meaning that
- * each thread has it's own {@link Context}. New context will be created if
- * current thread doesn't have one.
+ * Enter the invocation context, which marks as the entrance of an invocation chain.
+ * The context is wrapped with {@code ThreadLocal}, meaning that each thread has it's own {@link Context}.
+ * New context will be created if current thread doesn't have one.
*
- * A context will related to A {@link EntranceNode}, which is the entrance
- * of the invocation tree. New {@link EntranceNode} will be created if
- * current context does't have one. Note that same resource name will share
+ * A context will be bound with an {@link EntranceNode}, which represents the entrance statistic node
+ * of the invocation chain. New {@link EntranceNode} will be created if
+ * current context does't have one. Note that same context name will share
* same {@link EntranceNode} globally.
*
* Same resource in different context will count separately, see {@link NodeSelectorSlot}.
*
* This class stores summary runtime statistics of the resource, including rt, thread count, qps
- * and so on. Same resource shares the same {@link ClusterNode} globally, no matter in witch
+ * and so on. Same resource shares the same {@link ClusterNode} globally, no matter in which
* {@link com.alibaba.csp.sentinel.context.Context}.
*
@@ -43,9 +43,12 @@ import com.alibaba.csp.sentinel.slots.block.BlockException;
public class ClusterNode extends StatisticNode {
/**
- * The longer the application runs, the more stable this mapping will
- * become. so we don't concurrent map but a lock. as this lock only happens
+ * The origin map holds the pair: (origin, originNode) for one specific resource.
+ * The longer the application runs, the more stable this mapping will become.
+ * So we didn't use concurrent map here, but a lock, as this lock only happens
* at the very beginning while concurrent map will hold the lock all the time.
+ *
- * A {@link Node} use to hold statistics for specific resource name in the specific context.
+ * A {@link Node} used to hold statistics for specific resource name in the specific context.
* Each distinct resource in each distinct {@link Context} will corresponding to a {@link DefaultNode}.
*
- * This class may have a list of sub {@link DefaultNode}s. sub-node will be created when
- * call {@link SphU}#entry() or {@link SphO}@entry() multi times in the same {@link Context}.
+ * This class may have a list of sub {@link DefaultNode}s. Child nodes will be created when
+ * calling {@link SphU}#entry() or {@link SphO}@entry() multiple times in the same {@link Context}.
*
- * {@code distinct context name count * distinct origin count}
- * So when origin is too many, memory efficiency should be carefully considered.
+ * The origin node will be created in {@link com.alibaba.csp.sentinel.slots.clusterbuilder.ClusterBuilderSlot}.
+ * Note that each distinct {@code origin} of different resources will lead to creating different new
+ * {@link Node}, meaning that total amount of created origin statistic nodes will be:
+ * {@code distinct resource name amount * distinct origin count}.
+ * So when there are too many origins, memory footprint should be carefully considered.
*
* One resource has only one cluster node, while one resource can have multiple - * default node. + * default nodes. *
* * @author jialiang.linjl @@ -65,8 +65,7 @@ public class ClusterBuilderSlot extends AbstractLinkedProcessorSlot