robocanic commented on code in PR #1422:
URL: https://github.com/apache/dubbo-admin/pull/1422#discussion_r3001194739


##########
pkg/store/dbcommon/gorm_store.go:
##########
@@ -142,8 +145,10 @@ func (gs *GormStore) Add(obj interface{}) error {
                return err
        }
 
-       // Update indices after successful DB operation
-       gs.indices.UpdateResource(resource, nil)
+       // Persist index entries to DB
+       if err := gs.persistIndexEntries(resource, nil); err != nil {
+               logger.Warnf("failed to persist index entries for %s: %v", 
resource.ResourceKey(), err)
+       }
 
        return nil

Review Comment:
   
从整体架构上来说,index和resource双写确实需要作为一个原子行为来执行,只要有一个失败就都失败,但这里不太确定上游的重试行为。可以评估一下这里变更范围和有效性@thunguo



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