#369 Instance list persisted on disk if enabled.
This commit is contained in:
parent
9d8db9799d
commit
c2672953d2
@ -102,6 +102,10 @@ public class UtilsAndCommons {
|
||||
|
||||
public static final String API_DOM = "/api/dom";
|
||||
|
||||
public static final String INSTANCE_LIST_PERSISTED_PROPERTY_KEY = "NacosNamingInstanceListPersisted";
|
||||
|
||||
public static final boolean INSTANCE_LIST_PERSISTED = Boolean.getBoolean(INSTANCE_LIST_PERSISTED_PROPERTY_KEY);
|
||||
|
||||
public static final ScheduledExecutorService SERVER_STATUS_EXECUTOR;
|
||||
|
||||
public static final ScheduledExecutorService DOMAIN_SYNCHRONIZATION_EXECUTOR;
|
||||
|
@ -396,9 +396,10 @@ public class RaftCore {
|
||||
}
|
||||
|
||||
// do apply
|
||||
if (datum.key.startsWith(UtilsAndCommons.DOMAINS_DATA_ID)) {
|
||||
if (datum.key.startsWith(UtilsAndCommons.DOMAINS_DATA_ID) || UtilsAndCommons.INSTANCE_LIST_PERSISTED) {
|
||||
RaftStore.write(datum);
|
||||
}
|
||||
|
||||
RaftCore.datums.put(datum.key, datum);
|
||||
|
||||
if (datum.key.startsWith(UtilsAndCommons.DOMAINS_DATA_ID)) {
|
||||
@ -797,7 +798,8 @@ public class RaftCore {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (datum.key.startsWith(UtilsAndCommons.DOMAINS_DATA_ID)) {
|
||||
if (datum.key.startsWith(UtilsAndCommons.DOMAINS_DATA_ID) ||
|
||||
UtilsAndCommons.INSTANCE_LIST_PERSISTED) {
|
||||
RaftStore.write(datum);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user