Skip to content

Commit c031580

Browse files
committed
fix response
1 parent 3c664e1 commit c031580

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"
@@ -503,8 +504,10 @@ func writeValuesWithHits(w http.ResponseWriter, qctx *logstorage.QueryContext, v
503504

504505
func writeTenantIDs(w http.ResponseWriter, tenantIDs []logstorage.TenantID, disableCompression bool) error {
505506
// Marshal tenantIDs at first
506-
var b []byte
507-
logstorage.MarshalTenantIDs(b, tenantIDs)
507+
b, err := json.Marshal(tenantIDs)
508+
if err != nil {
509+
return fmt.Errorf("cannot marshal tenantIDs: %w", err)
510+
}
508511
if !disableCompression {
509512
b = zstd.CompressLevel(nil, b, 1)
510513
}

0 commit comments

Comments
 (0)