Browse Source

fix: replay source-side events for all handlers on cross-dir moves

Pass nil newEntry to bucket, IAM, and circuit-breaker handlers for
the source directory during cross-directory moves, so all watchers
can clear caches for the moved-away resource.
pull/8560/head
Chris Lu 1 day ago
parent
commit
a65a971f0a
  1. 4
      weed/s3api/auth_credentials_subscribe.go

4
weed/s3api/auth_credentials_subscribe.go

@ -35,7 +35,9 @@ func (s3a *S3ApiServer) subscribeMetaEvents(clientName string, lastTsNs int64, p
// For moves across directories, also notify handlers about the source directory // For moves across directories, also notify handlers about the source directory
if message.NewParentPath != "" && resp.Directory != message.NewParentPath { if message.NewParentPath != "" && resp.Directory != message.NewParentPath {
_ = s3a.onIamConfigChange(resp.Directory, message.OldEntry, message.NewEntry)
_ = s3a.onBucketMetadataChange(resp.Directory, message.OldEntry, nil)
_ = s3a.onIamConfigChange(resp.Directory, message.OldEntry, nil)
_ = s3a.onCircuitBreakerConfigChange(resp.Directory, message.OldEntry, nil)
} }
return nil return nil

Loading…
Cancel
Save