Skip to content

Commit

Permalink
Fix wrong data type
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Jung <[email protected]>
  • Loading branch information
justinjung04 committed Jun 4, 2024
1 parent 46f696d commit f910fdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/store/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -2880,12 +2880,12 @@ func (r *bucketIndexReader) fetchExpandedPostingsFromCache(ctx context.Context,
return false, nil, nil
}
for _, b := range bytesLimiters {
if err := b.ReserveWithType(uint64(len(dataFromCache)), PostingsFetched); err != nil {
if err := b.ReserveWithType(uint64(len(dataFromCache)), PostingsTouched); err != nil {
return false, nil, httpgrpc.Errorf(int(codes.ResourceExhausted), "exceeded bytes limit while loading expanded postings from index cache: %s", err)
}
}

r.stats.add(PostingsFetched, 1, len(dataFromCache))
r.stats.add(PostingsTouched, 1, len(dataFromCache))
p, closeFns, err := r.decodeCachedPostings(dataFromCache)
defer func() {
for _, closeFn := range closeFns {
Expand Down

0 comments on commit f910fdc

Please sign in to comment.