mirror of
https://github.com/pgsty/minio.git
synced 2026-07-24 06:26:17 +03:00
Rename getUUID() into mustGetUUID() (#3320)
In case of UUID generation failure mustGetUUID() will panic than infinitely trying in for loop.
This commit is contained in:
+2
-2
@@ -384,7 +384,7 @@ func (xl xlObjects) PutObject(bucket string, object string, size int64, data io.
|
||||
metadata = make(map[string]string)
|
||||
}
|
||||
|
||||
uniqueID := getUUID()
|
||||
uniqueID := mustGetUUID()
|
||||
tempErasureObj := path.Join(uniqueID, "part.1")
|
||||
tempObj := uniqueID
|
||||
|
||||
@@ -518,7 +518,7 @@ func (xl xlObjects) PutObject(bucket string, object string, size int64, data io.
|
||||
}
|
||||
|
||||
// Rename if an object already exists to temporary location.
|
||||
newUniqueID := getUUID()
|
||||
newUniqueID := mustGetUUID()
|
||||
if xl.isObject(bucket, object) {
|
||||
// Delete the temporary copy of the object that existed before this PutObject request.
|
||||
defer xl.deleteObject(minioMetaTmpBucket, newUniqueID)
|
||||
|
||||
Reference in New Issue
Block a user