Aias00 commented on code in PR #7749:
URL: https://github.com/apache/shenyu/pull/7749#discussion_r4303401587


##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/InstanceCheckService.java:
##########
@@ -171,21 +174,46 @@ private void doCheck() {
         collectStateData();
     }
 
-    public void syncDB() {
-        instanceHealthBeatInfo.values().forEach(vo -> {
-            instanceInfoService.createOrUpdate(vo);
-        });
+    public synchronized void syncDB() {
+        try {
+            List<InstanceInfoVO> snapshot = new 
ArrayList<>(instanceHealthBeatInfo.values());

Review Comment:
   The whole-loop `catch` means one failing instance aborts the rest of the 
sync. #7765 (same author, already approved) adds a per-instance try/catch to 
this same method; the merged version should keep that granularity, and the two 
patches will conflict textually — please rebase one on the other and state 
which wins.



-- 
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]

Reply via email to