Vanillaxi commented on code in PR #3482:
URL: https://github.com/apache/dubbo-go/pull/3482#discussion_r3568394408


##########
registry/polaris/core.go:
##########
@@ -72,6 +76,76 @@ func (watcher *PolarisServiceWatcher) lazyRun() {
        })
 }
 
+// setInitialSnapshot stores synchronously loaded instances as the baseline for
+// reconciling the first successful watcher full snapshot.
+func (watcher *PolarisServiceWatcher) setInitialSnapshot(instances 
[]model.Instance) {
+       watcher.initialSnapshotLock.Lock()
+       defer watcher.initialSnapshotLock.Unlock()
+
+       // A watcher is reused per service. Never re-arm reconciliation after 
its first successful snapshot.
+       if watcher.initialSnapshotConsumed {

Review Comment:
   Thanks,done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to