#502 Fix bug
This commit is contained in:
parent
fed016468a
commit
27622664e1
@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.alibaba.nacos.naming.consistency.ephemeral.distro;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.nacos.naming.cluster.servers.Server;
|
||||
import com.alibaba.nacos.naming.misc.GlobalConfig;
|
||||
import com.alibaba.nacos.naming.misc.GlobalExecutor;
|
||||
@ -98,6 +99,10 @@ public class TaskDispatcher {
|
||||
String key = queue.poll(partitionConfig.getTaskDispatchPeriod(),
|
||||
TimeUnit.MILLISECONDS);
|
||||
|
||||
if (Loggers.EPHEMERAL.isDebugEnabled() && StringUtils.isNotBlank(key)) {
|
||||
Loggers.EPHEMERAL.debug("got key: {}", key);
|
||||
}
|
||||
|
||||
if (dataSyncer.getServers() == null || dataSyncer.getServers().isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
@ -121,6 +126,11 @@ public class TaskDispatcher {
|
||||
SyncTask syncTask = new SyncTask();
|
||||
syncTask.setKeys(keys);
|
||||
syncTask.setTargetServer(member.getKey());
|
||||
|
||||
if (Loggers.EPHEMERAL.isDebugEnabled() && StringUtils.isNotBlank(key)) {
|
||||
Loggers.EPHEMERAL.debug("add sync task: {}", JSON.toJSONString(syncTask));
|
||||
}
|
||||
|
||||
dataSyncer.submit(syncTask, 0);
|
||||
}
|
||||
lastDispatchTime = System.currentTimeMillis();
|
||||
|
@ -106,6 +106,7 @@ public class ClientBeatCheckTask implements Runnable {
|
||||
NamingProxy.Request request = NamingProxy.Request.newRequest();
|
||||
request.appendParam("ip", instance.getIp())
|
||||
.appendParam("port", String.valueOf(instance.getPort()))
|
||||
.appendParam("ephemeral", "true")
|
||||
.appendParam("clusterName", instance.getClusterName())
|
||||
.appendParam("serviceName", service.getName())
|
||||
.appendParam("namespaceId", service.getNamespaceId());
|
||||
|
Loading…
Reference in New Issue
Block a user