diff --git a/cmd/admin-handlers.go b/cmd/admin-handlers.go index 8ba0a8c5a..1a77cd484 100644 --- a/cmd/admin-handlers.go +++ b/cmd/admin-handlers.go @@ -978,8 +978,7 @@ func (a adminAPIHandlers) SpeedtestHandler(w http.ResponseWriter, r *http.Reques } deleteBucket := func() { - loc := pathJoin(minioMetaSpeedTestBucket, minioMetaSpeedTestBucketPrefix) - objectAPI.DeleteBucket(context.Background(), loc, DeleteBucketOptions{ + objectAPI.DeleteBucket(context.Background(), pathJoin(minioMetaBucket, "speedtest"), DeleteBucketOptions{ Force: true, NoRecreate: true, }) diff --git a/cmd/object-api-utils.go b/cmd/object-api-utils.go index 8d6642581..fa90d1cd2 100644 --- a/cmd/object-api-utils.go +++ b/cmd/object-api-utils.go @@ -61,10 +61,7 @@ const ( // MinIO tmp meta prefix. minioMetaTmpBucket = minioMetaBucket + "/tmp" // MinIO tmp meta prefix for deleted objects. - minioMetaTmpDeletedBucket = minioMetaTmpBucket + "/.trash" - minioMetaSpeedTestBucket = minioMetaBucket + "/speedtest" - minioMetaSpeedTestBucketPrefix = "objects/" - + minioMetaTmpDeletedBucket = minioMetaTmpBucket + "/.trash" // DNS separator (period), used for bucket name validation. dnsDelimiter = "." // On compressed files bigger than this; diff --git a/cmd/peer-rest-server.go b/cmd/peer-rest-server.go index 499341b19..e773c8bfb 100644 --- a/cmd/peer-rest-server.go +++ b/cmd/peer-rest-server.go @@ -1168,7 +1168,6 @@ func selfSpeedtest(ctx context.Context, size, concurrent int, duration time.Dura var totalBytesWritten uint64 var totalBytesRead uint64 - bucket := minioMetaSpeedTestBucket objCountPerThread := make([]uint64, concurrent) uploadsCtx, uploadsCancel := context.WithCancel(context.Background()) defer uploadsCancel() @@ -1178,7 +1177,7 @@ func selfSpeedtest(ctx context.Context, size, concurrent int, duration time.Dura uploadsCancel() }() - objNamePrefix := minioMetaSpeedTestBucketPrefix + uuid.New().String() + objNamePrefix := "speedtest/objects/" + uuid.New().String() wg.Add(concurrent) for i := 0; i < concurrent; i++ { @@ -1198,7 +1197,7 @@ func selfSpeedtest(ctx context.Context, size, concurrent int, duration time.Dura return } reader := NewPutObjReader(hashReader) - objInfo, err := objAPI.PutObject(uploadsCtx, bucket, fmt.Sprintf("%s.%d.%d", + objInfo, err := objAPI.PutObject(uploadsCtx, minioMetaBucket, fmt.Sprintf("%s.%d.%d", objNamePrefix, i, objCountPerThread[i]), reader, ObjectOptions{ UserDefined: map[string]string{ xhttp.AmzStorageClass: storageClass, @@ -1245,7 +1244,7 @@ func selfSpeedtest(ctx context.Context, size, concurrent int, duration time.Dura if objCountPerThread[i] == j { j = 0 } - r, err := objAPI.GetObjectNInfo(downloadsCtx, bucket, fmt.Sprintf("%s.%d.%d", + r, err := objAPI.GetObjectNInfo(downloadsCtx, minioMetaBucket, fmt.Sprintf("%s.%d.%d", objNamePrefix, i, j), nil, nil, noLock, ObjectOptions{}) if err != nil { if !contextCanceled(downloadsCtx) {