mirror of
https://github.com/pgsty/minio.git
synced 2026-10-30 12:30:39 +03:00
fix: order bucket deletion and metadata publication safely
Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
+1
-10
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user