repair speel error and add debug log

This commit is contained in:
pbting 2019-09-06 12:19:16 +08:00
parent ce66b46e8a
commit 46bcece7aa
3 changed files with 6 additions and 2 deletions

View File

@ -56,6 +56,6 @@ public interface Constants {
String IP_ADDRESS = "nacos.inetutils.ip-address"; String IP_ADDRESS = "nacos.inetutils.ip-address";
String PREFER_HOSTNAME_OVER_IP = "nacos.inetutils.prefer-hostname-over-ip"; String PREFER_HOSTNAME_OVER_IP = "nacos.inetutils.prefer-hostname-over-ip";
String SYSTEM_PREFER_HOSTNAME_OVER_IP = "nacos.preferHostnameOverIp"; String SYSTEM_PREFER_HOSTNAME_OVER_IP = "nacos.preferHostnameOverIp";
String WEN_CONTEXT_PATH = "server.servlet.context-path"; String WEB_CONTEXT_PATH = "server.servlet.context-path";
String COMMA_DIVISION = ","; String COMMA_DIVISION = ",";
} }

View File

@ -59,7 +59,7 @@ public class RunningConfig implements ApplicationListener<WebServerInitializedEv
public static String getContextPath() { public static String getContextPath() {
if (!isServerInitialized) { if (!isServerInitialized) {
String contextPath = PropertyUtil.getProperty(Constants.WEN_CONTEXT_PATH); String contextPath = PropertyUtil.getProperty(Constants.WEB_CONTEXT_PATH);
if (Constants.ROOT_WEB_CONTEXT_PATH.equals(contextPath)) { if (Constants.ROOT_WEB_CONTEXT_PATH.equals(contextPath)) {
return StringUtils.EMPTY; return StringUtils.EMPTY;
} else { } else {

View File

@ -96,6 +96,10 @@ public class DataSyncer {
} }
List<String> keys = task.getKeys(); List<String> keys = task.getKeys();
if (Loggers.SRV_LOG.isDebugEnabled()) {
Loggers.SRV_LOG.debug("try to sync data for this keys {}.", keys);
}
// 2. get the datums by keys and check the datum is empty or not // 2. get the datums by keys and check the datum is empty or not
Map<String, Datum> datumMap = dataStore.batchGet(keys); Map<String, Datum> datumMap = dataStore.batchGet(keys);
if (datumMap == null || datumMap.isEmpty()) { if (datumMap == null || datumMap.isEmpty()) {