fix: order bucket deletion and metadata publication safely

Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
Feng Ruohang
2026-09-08 14:43:15 +08:00
parent 39b8e6c30a
commit f9da3b919d
5 changed files with 240 additions and 49 deletions
+1 -10
View File
@@ -544,18 +544,9 @@ func (s *peerRESTServer) LoadBucketMetadataHandler(mss *grid.MSS) (np grid.NoPay
return np, grid.NewRemoteErr(err)
}
// Publish monotonically: an overlapping reload that read an older revision
// must not overwrite a newer resident record (issue #105).
// Publish the metadata and derived registries from the same current revision.
globalBucketMetadataSys.setReloaded(bucketName, meta)
if meta.notificationConfig != nil {
globalEventNotifier.AddRulesMap(bucketName, meta.notificationConfig.ToRulesMap())
}
if meta.bucketTargetConfig != nil {
globalBucketTargetSys.UpdateAllTargets(bucketName, meta.bucketTargetConfig)
}
return np, nerr
}