mirror of
https://github.com/pgsty/minio.git
synced 2026-08-09 15:53:28 +03:00
Xl layer selfheal quorum2
* xl/selfheal: selfheal based on read quorum on GET * xl: getReadableDisks() also returns whether self-heal is needed so that this info can be used by ReadFile/SelfHeal/StatFile. * xl: trigger selfheal from StatFile.
This commit is contained in:
committed by
Harshavardhana
parent
9bd9441107
commit
becc814531
@@ -9,6 +9,7 @@ import (
|
||||
|
||||
// Get parts.json metadata as a map slice.
|
||||
// Returns error slice indicating the failed metadata reads.
|
||||
// Read lockNS() should be done by caller.
|
||||
func (xl XL) getPartsMetadata(volume, path string) ([]fileMetadata, []error) {
|
||||
errs := make([]error, len(xl.storageDisks))
|
||||
metadataArray := make([]fileMetadata, len(xl.storageDisks))
|
||||
@@ -38,6 +39,7 @@ func (xl XL) getPartsMetadata(volume, path string) ([]fileMetadata, []error) {
|
||||
//
|
||||
// Returns collection of errors, indexed in accordance with input
|
||||
// updateParts order.
|
||||
// Write lockNS() should be done by caller.
|
||||
func (xl XL) setPartsMetadata(volume, path string, metadata fileMetadata, updateParts []bool) []error {
|
||||
metadataFilePath := filepath.Join(path, metadataFile)
|
||||
errs := make([]error, len(xl.storageDisks))
|
||||
|
||||
Reference in New Issue
Block a user