This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch 3.1
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.1 by this push:
     new 889fbcce5a Add some cas update failed logs (#11251)
889fbcce5a is described below

commit 889fbcce5a0658e4dae11d525aa1df40df248160
Author: Albumen Kevin <[email protected]>
AuthorDate: Sun Jan 8 15:55:59 2023 +0800

    Add some cas update failed logs (#11251)
---
 .../registry/client/metadata/MetadataServiceNameMapping.java   | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git 
a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/MetadataServiceNameMapping.java
 
b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/MetadataServiceNameMapping.java
index d7b4856acb..f57e56c901 100644
--- 
a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/MetadataServiceNameMapping.java
+++ 
b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/MetadataServiceNameMapping.java
@@ -104,7 +104,15 @@ public class MetadataServiceNameMapping extends 
AbstractServiceNameMapping {
                     }
                     succeeded = 
metadataReport.registerServiceAppMapping(serviceInterface, 
DEFAULT_MAPPING_GROUP, newConfigContent, configItem.getTicket());
                     if (!succeeded) {
-                        
Thread.sleep(ThreadLocalRandom.current().nextInt(casRetryWaitTime));
+                        int waitTime = 
ThreadLocalRandom.current().nextInt(casRetryWaitTime);
+                        logger.info("Failed to publish service name mapping to 
metadata center by cas operation. " +
+                            "Times: " + casRetryTimes + ". " +
+                            "Next retry delay: " + waitTime + ". " +
+                            "Service Interface: " + serviceInterface + ". " +
+                            "Origin Content: " + oldConfigContent + ". " +
+                            "Ticket: " + configItem.getTicket() + ". " +
+                            "Excepted context: " + newConfigContent);
+                        Thread.sleep(waitTime);
                     }
                 } while (!succeeded && currentRetryTimes++ <= casRetryTimes);
 

Reply via email to