mirror of https://github.com/minio/minio.git
Further print log messages once per error (#17618)
This commit is contained in:
parent
e8c98c3246
commit
bd6842d917
|
@ -65,10 +65,10 @@ func (sys *BucketQuotaSys) Init(objAPI ObjectLayer) {
|
||||||
func (sys *BucketQuotaSys) GetBucketUsageInfo(bucket string) (BucketUsageInfo, error) {
|
func (sys *BucketQuotaSys) GetBucketUsageInfo(bucket string) (BucketUsageInfo, error) {
|
||||||
v, err := sys.bucketStorageCache.Get()
|
v, err := sys.bucketStorageCache.Get()
|
||||||
if err != nil && v != nil {
|
if err != nil && v != nil {
|
||||||
logger.LogIf(GlobalContext, fmt.Errorf("unable to retrieve usage information for bucket: %s, relying on older value cached in-memory: err(%v)", bucket, err))
|
logger.LogOnceIf(GlobalContext, fmt.Errorf("unable to retrieve usage information for bucket: %s, relying on older value cached in-memory: err(%v)", bucket, err), "bucket-usage-cache-"+bucket)
|
||||||
}
|
}
|
||||||
if v == nil {
|
if v == nil {
|
||||||
logger.LogIf(GlobalContext, errors.New("unable to retrieve usage information for bucket: %s, no reliable usage value available - quota will not be enforced"))
|
logger.LogOnceIf(GlobalContext, errors.New("unable to retrieve usage information for bucket: %s, no reliable usage value available - quota will not be enforced"), "bucket-usage-empty-"+bucket)
|
||||||
}
|
}
|
||||||
|
|
||||||
var bui BucketUsageInfo
|
var bui BucketUsageInfo
|
||||||
|
|
|
@ -2273,12 +2273,12 @@ func (s *xlStorage) RenameData(ctx context.Context, srcVolume, srcPath string, f
|
||||||
xlMetaLegacy := &xlMetaV1Object{}
|
xlMetaLegacy := &xlMetaV1Object{}
|
||||||
json := jsoniter.ConfigCompatibleWithStandardLibrary
|
json := jsoniter.ConfigCompatibleWithStandardLibrary
|
||||||
if err := json.Unmarshal(dstBuf, xlMetaLegacy); err != nil {
|
if err := json.Unmarshal(dstBuf, xlMetaLegacy); err != nil {
|
||||||
logger.LogIf(ctx, err)
|
logger.LogOnceIf(ctx, err, "read-data-unmarshal-"+dstFilePath)
|
||||||
// Data appears corrupt. Drop data.
|
// Data appears corrupt. Drop data.
|
||||||
} else {
|
} else {
|
||||||
xlMetaLegacy.DataDir = legacyDataDir
|
xlMetaLegacy.DataDir = legacyDataDir
|
||||||
if err = xlMeta.AddLegacy(xlMetaLegacy); err != nil {
|
if err = xlMeta.AddLegacy(xlMetaLegacy); err != nil {
|
||||||
logger.LogIf(ctx, err)
|
logger.LogOnceIf(ctx, err, "read-data-add-legacy-"+dstFilePath)
|
||||||
}
|
}
|
||||||
legacyPreserved = true
|
legacyPreserved = true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue