You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/08/16 00:25:52 UTC
[GitHub] heyile commented on a change in pull request #872: [SCB-846]
ConfigCenterClient log much in the pull mode
heyile commented on a change in pull request #872: [SCB-846] ConfigCenterClient log much in the pull mode
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/872#discussion_r210448460
##########
File path: dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ParseConfigUtils.java
##########
@@ -74,14 +74,23 @@ public void initWithUpdateHandler(UpdateHandler updateHandler) {
public void refreshConfigItems(Map<String, Map<String, Object>> remoteItems) {
try {
configLock.lock();
+ String oldRevision = currentVersionInfo;
+ boolean newVersion = false;
currentVersionInfo =
remoteItems.getOrDefault("revision", new HashMap<>()).getOrDefault("version", "default").toString();
//make sure the currentVersionInfo != ""
currentVersionInfo = currentVersionInfo.equals("") ? "default" : currentVersionInfo;
- remoteItems.remove("revision");//the key revision is not the config setting
+ if (remoteItems.containsKey("revision")) {
Review comment:
impossible.
in the new version, when oldRevision is same with newRevision, it will returen 304
in the old version, it will not contain key revision
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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
With regards,
Apache Git Services