ignore typed errors correctly in list cache layer (#10879)

bonus write bucket metadata cache with enough quorum

Possible fix for #10868
This commit is contained in:
Harshavardhana
2020-11-12 09:28:56 -08:00
committed by GitHub
parent f86d3538f6
commit ca88ca753c
4 changed files with 47 additions and 41 deletions

View File

@@ -19,13 +19,13 @@ package cmd
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"strings"
"sync"
jsoniter "github.com/json-iterator/go"
"github.com/klauspost/compress/s2"
"github.com/minio/minio/cmd/logger"
"github.com/tinylib/msgp/msgp"
@@ -816,6 +816,7 @@ type metacacheBlock struct {
}
func (b metacacheBlock) headerKV() map[string]string {
var json = jsoniter.ConfigCompatibleWithStandardLibrary
v, err := json.Marshal(b)
if err != nil {
logger.LogIf(context.Background(), err) // Unlikely