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 5f875ea958 Fix Registry Notification use same event time (#12556)
5f875ea958 is described below

commit 5f875ea9581373eb720ff5335db72c5b4cf7c3b3
Author: Albumen Kevin <[email protected]>
AuthorDate: Mon Jun 19 09:33:36 2023 +0800

    Fix Registry Notification use same event time (#12556)
---
 .../src/main/java/org/apache/dubbo/registry/RegistryNotifier.java | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 
a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/RegistryNotifier.java
 
b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/RegistryNotifier.java
index 168368690a..fe9296b8e3 100644
--- 
a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/RegistryNotifier.java
+++ 
b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/RegistryNotifier.java
@@ -77,6 +77,14 @@ public abstract class RegistryNotifier {
             }
             scheduler.submit(new NotificationTask(this, notifyTime));
         }
+        try {
+            while (this.lastEventTime == System.currentTimeMillis()) {
+                // wait to let event time refresh
+                Thread.sleep(1);
+            }
+        } catch (InterruptedException e) {
+            Thread.currentThread().interrupt();
+        }
     }
 
     public long getDelayTime() {

Reply via email to