You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/01/25 09:34:59 UTC
[GitHub] [skywalking] wu-sheng commented on a change in pull request #6255: Fix that the dynamic configuration is deleted on the server side but does not take effect on the agent.
wu-sheng commented on a change in pull request #6255:
URL: https://github.com/apache/skywalking/pull/6255#discussion_r563578088
##########
File path: apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/dynamic/ConfigurationDiscoveryService.java
##########
@@ -168,6 +172,30 @@ public void handleConfigurationDiscoveryCommand(ConfigurationDiscoveryCommand co
LOGGER.trace("Current configurations after the sync, configurations:{}", register.toString());
}
+ /**
+ * Read the registered dynamic configuration, compare it with the dynamic configuration information returned by the
+ * service, and complete the dynamic configuration that has been deleted on the OAP.
+ *
+ * @param configurationDiscoveryCommand Describe dynamic configuration information
+ * @return Adapted dynamic configuration information
+ */
+ private List<KeyStringValuePair> readConfig(ConfigurationDiscoveryCommand configurationDiscoveryCommand) {
+ Map<String, KeyStringValuePair> commandConfigs = configurationDiscoveryCommand.getConfig()
+ .stream()
+ .collect(Collectors.toMap(
+ KeyStringValuePair::getKey,
+ Function.identity()
+ ));
+ List<KeyStringValuePair> configList = Lists.newArrayList();
+ for (final String name : register.keys()) {
Review comment:
So you are building the list with all keys, right? That is what we missed today.
----------------------------------------------------------------
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:
users@infra.apache.org