Add multipart uploads cache for ListMultipartUploads() (#20407)

this cache will be honored only when `prefix=""` while
performing ListMultipartUploads() operation.

This is mainly to satisfy applications like alluxio
for their underfs implementation and tests.

replaces https://github.com/minio/minio/pull/20181
This commit is contained in:
Harshavardhana
2024-09-09 09:58:30 -07:00
committed by GitHub
parent b1c849bedc
commit 8c9ab85cfa
7 changed files with 148 additions and 11 deletions

View File

@@ -691,6 +691,27 @@ func (sys *NotificationSys) ReloadPoolMeta(ctx context.Context) {
}
}
// DeleteUploadID notifies all the MinIO nodes to remove the
// given uploadID from cache
func (sys *NotificationSys) DeleteUploadID(ctx context.Context, uploadID string) {
ng := WithNPeers(len(sys.peerClients))
for idx, client := range sys.peerClients {
if client == nil {
continue
}
client := client
ng.Go(ctx, func() error {
return client.DeleteUploadID(ctx, uploadID)
}, idx, *client.host)
}
for _, nErr := range ng.Wait() {
reqInfo := (&logger.ReqInfo{}).AppendTags("peerAddress", nErr.Host.String())
if nErr.Err != nil {
peersLogOnceIf(logger.SetReqInfo(ctx, reqInfo), nErr.Err, nErr.Host.String())
}
}
}
// StopRebalance notifies all MinIO nodes to signal any ongoing rebalance
// goroutine to stop.
func (sys *NotificationSys) StopRebalance(ctx context.Context) {