<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> 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" checked=""> 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.7</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">In the process of switching Zookeeper to Nacos, we found that the startup speed of the application became slower, and a large number of Nacos threads were created. Looking at the source code, we found that every service registered in the application startup process would create a <strong>NamingService</strong>. We started to think that was the design. After a thorough review, we found that Dubbo had a static cache for the Nacos registry, and the cache key contained a dynamic parameter timestamp , every time a new service is registered, the latest value will be retrieved, and eventually the registry static cache will be invalid.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/39329138/89625727-ea0dfc80-d8ca-11ea-8474-2fc24b0f6c47.png"><img src="https://user-images.githubusercontent.com/39329138/89625727-ea0dfc80-d8ca-11ea-8474-2fc24b0f6c47.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">请大佬帮忙看看，多谢！</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div>
<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.6</li>
<li>Operating System version: springboot 2.1.7，zookeeper 3.6.1</li>
<li>Java version: java8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>设置接口DemoDubboService。</li>
<li>两个实现类DefaultDemoServiceImpl1，DefaultDemoServiceImpl2</li>
<li>分别设置<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/service/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/service">@service</a>(version = "1.0.0",group = "demo1"），<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/service/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/service">@service</a>(version = "1.0.0",group = "demo2"）</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">demo1,demo2都在zk注册</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">只能在zk中找到demo1</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div>