<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: *</li>
<li>Operating System version: *</li>
<li>Java version: *</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">Run it in different system having multiple network adapters.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">Stably successful.</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">Fail sometimes.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7</li>
<li>Operating System version: win64</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    ConsistentHashSelector(List&lt;Invoker&lt;T&gt;&gt; invokers, String methodName, int identityHashCode) {
        this.virtualInvokers = new TreeMap&lt;Long, Invoker&lt;T&gt;&gt;();
        this.identityHashCode = identityHashCode;
        URL url = invokers.get(0).getUrl();
        this.replicaNumber = url.getMethodParameter(methodName, HASH_NODES, 160);
        String[] index = COMMA_SPLIT_PATTERN.split(url.getMethodParameter(methodName, HASH_ARGUMENTS, &quot;0&quot;));
        argumentIndex = new int[index.length];
        for (int i = 0; i &lt; index.length; i++) {
            argumentIndex[i] = Integer.parseInt(index[i]);
        }
        for (Invoker&lt;T&gt; invoker : invokers) {
            String address = invoker.getUrl().getAddress();
            for (int i = 0; i &lt; replicaNumber / 4; i++) {
               //这里生成的16字节摘要为啥要分在四个节点
                byte[] digest = md5(address + i);
                for (int h = 0; h &lt; 4; h++) {
                    long m = hash(digest, h);
                    virtualInvokers.put(m, invoker);
                }
            }
        }
    }"><pre class="notranslate"><code class="notranslate">    ConsistentHashSelector(List&lt;Invoker&lt;T&gt;&gt; invokers, String methodName, int identityHashCode) {
        this.virtualInvokers = new TreeMap&lt;Long, Invoker&lt;T&gt;&gt;();
        this.identityHashCode = identityHashCode;
        URL url = invokers.get(0).getUrl();
        this.replicaNumber = url.getMethodParameter(methodName, HASH_NODES, 160);
        String[] index = COMMA_SPLIT_PATTERN.split(url.getMethodParameter(methodName, HASH_ARGUMENTS, "0"));
        argumentIndex = new int[index.length];
        for (int i = 0; i &lt; index.length; i++) {
            argumentIndex[i] = Integer.parseInt(index[i]);
        }
        for (Invoker&lt;T&gt; invoker : invokers) {
            String address = invoker.getUrl().getAddress();
            for (int i = 0; i &lt; replicaNumber / 4; i++) {
               //这里生成的16字节摘要为啥要分在四个节点
                byte[] digest = md5(address + i);
                for (int h = 0; h &lt; 4; h++) {
                    long m = hash(digest, h);
                    virtualInvokers.put(m, invoker);
                }
            }
        }
    }
</code></pre></div>