fix the conditions for resetting uuid in dynamic configuration (#588)
This commit is contained in:
parent
6baa4a7baa
commit
c38a19c6c6
|
|
@ -149,6 +149,7 @@ Callable {
|
|||
* Upgrade guava to 32.0.1
|
||||
* Fix issue with duplicate enhancement by ThreadPoolExecutor
|
||||
* Add plugin to support for RESTeasy 6.x.
|
||||
* Fix the conditions for resetting uuid, avoid the same uuid causing the configuration not to be updated.
|
||||
|
||||
#### Documentation
|
||||
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ public class ConfigurationDiscoveryService implements BootService, GRPCChannelLi
|
|||
builder.setService(Config.Agent.SERVICE_NAME);
|
||||
|
||||
// Some plugin will register watcher later.
|
||||
final int size = register.keys().size();
|
||||
final int size = register.getRegisterWatcherSize();
|
||||
if (lastRegisterWatcherSize != size) {
|
||||
// reset uuid, avoid the same uuid causing the configuration not to be updated.
|
||||
uuid = null;
|
||||
|
|
@ -273,6 +273,12 @@ public class ConfigurationDiscoveryService implements BootService, GRPCChannelLi
|
|||
return register.keySet();
|
||||
}
|
||||
|
||||
public int getRegisterWatcherSize() {
|
||||
return register.values().stream()
|
||||
.mapToInt(List::size)
|
||||
.sum();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
ArrayList<String> registerTableDescription = new ArrayList<>(register.size());
|
||||
|
|
|
|||
Loading…
Reference in New Issue