muse-dev[bot] commented on a change in pull request #6975:
URL: https://github.com/apache/skywalking/pull/6975#discussion_r635654763
##########
File path:
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/dynamic/ConfigurationDiscoveryService.java
##########
@@ -206,6 +208,15 @@ private void getAgentDynamicConfig() {
try {
ConfigurationSyncRequest.Builder builder =
ConfigurationSyncRequest.newBuilder();
builder.setService(Config.Agent.SERVICE_NAME);
+
+ // Some plugin will register watcher later.
+ final int size = register.keys().size();
+ if (lastRegisterWatcherSize != size) {
+ // reset uuid, avoid the same uuid causing the
configuration not to be updated.
+ uuid = null;
+ lastRegisterWatcherSize = size;
+ }
+
if (null != uuid) {
Review comment:
*opt.semgrep.java.lang.correctness.eqeq.eqeq:* `null == null` or `null
!= null` is always true. (Unless the value compared is a float or double).
To test if `null` is not-a-number, use `Double.isNaN(null)`.
(at-me [in a reply](https://docs.muse.dev/docs/talk-to-muse/) with `help` or
`ignore`)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]