Skip to content

Commit c5c8e9d

Browse files
committed
Replace JSON lib for encoding/decoding metas
Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
1 parent cc496c6 commit c5c8e9d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎pkg/storage/stores/shipper/bloomshipper/fetcher.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package bloomshipper
22

33
import (
44
"context"
5-
"encoding/json"
65
"os"
76
"path/filepath"
87
"sync"
@@ -11,6 +10,7 @@ import (
1110
"github.com/dolthub/swiss"
1211
"github.com/go-kit/log"
1312
"github.com/go-kit/log/level"
13+
jsoniter "github.com/json-iterator/go"
1414
"github.com/pkg/errors"
1515
"github.com/prometheus/client_golang/prometheus"
1616
"k8s.io/utils/keymutex"
@@ -189,6 +189,8 @@ func (f *Fetcher) processMetasCacheResponse(_ context.Context, refs []MetaRef, k
189189

190190
var lastErr error
191191
var size int64
192+
193+
json := jsoniter.ConfigFastest
192194
for i, ref := range refs {
193195
if raw, ok := found[f.client.Meta(ref).Addr()]; ok {
194196
meta := Meta{
@@ -209,6 +211,8 @@ func (f *Fetcher) writeBackMetas(ctx context.Context, metas []Meta) error {
209211
var err error
210212
keys := make([]string, len(metas))
211213
data := make([][]byte, len(metas))
214+
215+
json := jsoniter.ConfigFastest
212216
for i := range metas {
213217
keys[i] = f.client.Meta(metas[i].MetaRef).Addr()
214218
data[i], err = json.Marshal(metas[i])

0 commit comments

Comments
 (0)