mirror of
https://github.com/minio/minio.git
synced 2025-04-24 04:10:43 -04:00
ignore background healInfo in single drive setup (#15968)
This commit is contained in:
parent
4892a766a8
commit
b57fbff7c1
@ -118,6 +118,10 @@ type backgroundHealInfo struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func readBackgroundHealInfo(ctx context.Context, objAPI ObjectLayer) backgroundHealInfo {
|
func readBackgroundHealInfo(ctx context.Context, objAPI ObjectLayer) backgroundHealInfo {
|
||||||
|
if globalIsErasureSD {
|
||||||
|
return backgroundHealInfo{}
|
||||||
|
}
|
||||||
|
|
||||||
// Get last healing information
|
// Get last healing information
|
||||||
buf, err := readConfig(ctx, objAPI, backgroundHealInfoPath)
|
buf, err := readConfig(ctx, objAPI, backgroundHealInfoPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -127,15 +131,17 @@ func readBackgroundHealInfo(ctx context.Context, objAPI ObjectLayer) backgroundH
|
|||||||
return backgroundHealInfo{}
|
return backgroundHealInfo{}
|
||||||
}
|
}
|
||||||
var info backgroundHealInfo
|
var info backgroundHealInfo
|
||||||
err = json.Unmarshal(buf, &info)
|
if err = json.Unmarshal(buf, &info); err != nil {
|
||||||
if err != nil {
|
|
||||||
logger.LogIf(ctx, err)
|
logger.LogIf(ctx, err)
|
||||||
return backgroundHealInfo{}
|
|
||||||
}
|
}
|
||||||
return info
|
return info
|
||||||
}
|
}
|
||||||
|
|
||||||
func saveBackgroundHealInfo(ctx context.Context, objAPI ObjectLayer, info backgroundHealInfo) {
|
func saveBackgroundHealInfo(ctx context.Context, objAPI ObjectLayer, info backgroundHealInfo) {
|
||||||
|
if globalIsErasureSD {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
b, err := json.Marshal(info)
|
b, err := json.Marshal(info)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.LogIf(ctx, err)
|
logger.LogIf(ctx, err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user