Add comments about config client failover (#8327) (#8343)

This commit is contained in:
hutt 2022-05-12 19:28:27 +08:00 committed by GitHub
parent 4d8a7626aa
commit c68956b179
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,7 +148,11 @@ public class NacosConfigService implements ConfigService {
cr.setTenant(tenant);
cr.setGroup(group);
// use local config first
// We first try to use local failover content if exists.
// A config content for failover is not created by client program automatically,
// but is maintained by user.
// This is designed for certain scenario like client emergency reboot,
// changing config needed in the same time, while nacos server is down.
String content = LocalConfigInfoProcessor.getFailover(worker.getAgentName(), dataId, group, tenant);
if (content != null) {
LOGGER.warn("[{}] [get-config] get failover ok, dataId={}, group={}, tenant={}, config={}",