Skip to content

Commit 859e99a

Browse files
committed
fix response
1 parent 68a2147 commit 859e99a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/vlselect/internalselect/internalselect.go

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

33
import (
44
"context"
5+
"encoding/json"
56
"flag"
67
"fmt"
78
"math"
@@ -426,8 +427,10 @@ func writeValuesWithHits(w http.ResponseWriter, qctx *logstorage.QueryContext, v
426427

427428
func writeTenantIDs(w http.ResponseWriter, tenantIDs []logstorage.TenantID, disableCompression bool) error {
428429
// Marshal tenantIDs at first
429-
var b []byte
430-
logstorage.MarshalTenantIDs(b, tenantIDs)
430+
b, err := json.Marshal(tenantIDs)
431+
if err != nil {
432+
return fmt.Errorf("cannot marshal tenantIDs: %w", err)
433+
}
431434
if !disableCompression {
432435
b = zstd.CompressLevel(nil, b, 1)
433436
}

0 commit comments

Comments
 (0)