mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 21:50:22 +03:00
XL: Rename, cleanup and add more comments. (#1769)
- xl-v1-bucket.go - removes a whole bunch of code.
- {xl-v1,fs-v1}-metadata.go - add a lot of comments and rename functions
appropriately.
This commit is contained in:
committed by
Harshavardhana
parent
553fdb9211
commit
b2293c2bf4
+4
-5
@@ -63,9 +63,8 @@ func (fs fsObjects) newMultipartUploadCommon(bucket string, object string, meta
|
||||
meta = make(map[string]string)
|
||||
}
|
||||
|
||||
fsMeta := fsMetaV1{}
|
||||
fsMeta.Format = "fs"
|
||||
fsMeta.Version = "1"
|
||||
// Initialize `fs.json` values.
|
||||
fsMeta := newFSMetaV1()
|
||||
|
||||
// This lock needs to be held for any changes to the directory contents of ".minio/multipart/object/"
|
||||
nsMutex.Lock(minioMetaBucket, pathJoin(mpartMetaPrefix, bucket, object))
|
||||
@@ -454,7 +453,7 @@ func (fs fsObjects) listObjectPartsCommon(bucket, object, uploadID string, partN
|
||||
return ListPartsInfo{}, toObjectErr(err, minioMetaBucket, uploadIDPath)
|
||||
}
|
||||
// Only parts with higher part numbers will be listed.
|
||||
partIdx := fsMeta.SearchObjectPart(partNumberMarker)
|
||||
partIdx := fsMeta.ObjectPartIndex(partNumberMarker)
|
||||
parts := fsMeta.Parts
|
||||
if partIdx != -1 {
|
||||
parts = fsMeta.Parts[partIdx+1:]
|
||||
@@ -642,7 +641,7 @@ func (fs fsObjects) abortMultipartUploadCommon(bucket, object, uploadID string)
|
||||
// the object, if yes do not attempt to delete 'uploads.json'.
|
||||
uploadIDs, err := getUploadIDs(bucket, object, fs.storage)
|
||||
if err == nil {
|
||||
uploadIDIdx := uploadIDs.SearchUploadID(uploadID)
|
||||
uploadIDIdx := uploadIDs.Index(uploadID)
|
||||
if uploadIDIdx != -1 {
|
||||
uploadIDs.Uploads = append(uploadIDs.Uploads[:uploadIDIdx], uploadIDs.Uploads[uploadIDIdx+1:]...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user