mirror of
https://github.com/minio/minio.git
synced 2025-11-25 20:16:10 -05:00
xl: refactor functions to xl-v1-common.go xl-v1-utils.go. (#1357)
This commit is contained in:
committed by
Harshavardhana
parent
becc814531
commit
8c85815106
@@ -98,16 +98,15 @@ func (xl XL) getFileQuorumVersionMap(volume, path string) map[int]int64 {
|
||||
continue
|
||||
}
|
||||
|
||||
if version := metadata.Get("file.version"); version == nil {
|
||||
version, err := metadata.GetFileVersion()
|
||||
if err == errMetadataKeyNotExist {
|
||||
fileQuorumVersionMap[index] = 0
|
||||
} else {
|
||||
// Convert string to integer.
|
||||
fileVersion, err := strconv.ParseInt(version[0], 10, 64)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
fileQuorumVersionMap[index] = fileVersion
|
||||
continue
|
||||
}
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
fileQuorumVersionMap[index] = version
|
||||
}
|
||||
return fileQuorumVersionMap
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user