This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.2
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.2 by this push:
new a45f50d8ac Enhance application-level registry notify message (#13172)
a45f50d8ac is described below
commit a45f50d8acdf0d4413c086ee8e66efb34688e743
Author: TomlongTK <[email protected]>
AuthorDate: Tue Oct 10 10:06:18 2023 +0800
Enhance application-level registry notify message (#13172)
* Enhance application-level registry notify message
* Recovery complete message, because it works in single thread.
---
.../dubbo/registry/client/ServiceDiscoveryRegistryDirectory.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistryDirectory.java
b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistryDirectory.java
index 5dbfac3ce8..456b581fde 100644
---
a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistryDirectory.java
+++
b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistryDirectory.java
@@ -289,7 +289,7 @@ public class ServiceDiscoveryRegistryDirectory<T> extends
DynamicDirectory<T> {
this.originalUrls = invokerUrls;
if (invokerUrls.size() == 1 &&
EMPTY_PROTOCOL.equals(invokerUrls.get(0).getProtocol())) {
- logger.warn(PROTOCOL_UNSUPPORTED, "", "", "Received url with EMPTY
protocol, will clear all available addresses.");
+ logger.warn(PROTOCOL_UNSUPPORTED, "", "", String.format("Received
url with EMPTY protocol from registry %s, will clear all available addresses.",
this));
refreshRouter(BitList.emptyList(), () ->
this.forbidden = true // Forbid to access
);
@@ -297,7 +297,7 @@ public class ServiceDiscoveryRegistryDirectory<T> extends
DynamicDirectory<T> {
} else {
this.forbidden = false; // Allow accessing
if (CollectionUtils.isEmpty(invokerUrls)) {
- logger.warn(PROTOCOL_UNSUPPORTED, "", "", "Received empty url
list, will ignore for protection purpose.");
+ logger.warn(PROTOCOL_UNSUPPORTED, "", "",
String.format("Received empty url list from registry %s, will ignore for
protection purpose.", this));
return;
}
@@ -311,10 +311,10 @@ public class ServiceDiscoveryRegistryDirectory<T> extends
DynamicDirectory<T> {
localUrlInvokerMap.forEach(oldUrlInvokerMap::put);
}
Map<ProtocolServiceKeyWithAddress, Invoker<T>> newUrlInvokerMap =
toInvokers(oldUrlInvokerMap, invokerUrls);// Translate url list to Invoker map
- logger.info("Refreshed invoker size " + newUrlInvokerMap.size());
+ logger.info(String.format("Refreshed invoker size %s from registry
%s", newUrlInvokerMap.size(), this));
if (CollectionUtils.isEmptyMap(newUrlInvokerMap)) {
- logger.error(PROTOCOL_UNSUPPORTED, "", "", "Unsupported
protocol.", new IllegalStateException("Cannot create invokers from url address
list (total " + invokerUrls.size() + ")"));
+ logger.error(PROTOCOL_UNSUPPORTED, "", "", "Unsupported
protocol.", new IllegalStateException(String.format("Cannot create invokers
from url address list (total %s)", invokerUrls.size())));
return;
}
List<Invoker<T>> newInvokers = Collections.unmodifiableList(new
ArrayList<>(newUrlInvokerMap.values()));