app/vminsert: fixes merge conflicts

This commit is contained in:
f41gh7 2023-03-14 11:27:24 +01:00
parent fbfd7415da
commit 1ab593f807
No known key found for this signature in database
GPG key ID: 4558311CF775EC72
2 changed files with 7 additions and 3 deletions

View file

@ -8,7 +8,8 @@ import (
"github.com/VictoriaMetrics/VictoriaMetrics/app/vminsert/netstorage"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/auth"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/logger"
parser "github.com/VictoriaMetrics/VictoriaMetrics/lib/protoparser/vmimport"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/protoparser/vmimport"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/protoparser/vmimport/stream"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/storage"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/tenantmetrics"
"github.com/VictoriaMetrics/metrics"
@ -29,12 +30,12 @@ func generateUniqueGenerationID() []byte {
// InsertHandler processes `/api/v1/update/series` request.
func InsertHandler(at *auth.Token, req *http.Request) error {
isGzipped := req.Header.Get("Content-Encoding") == "gzip"
return parser.ParseStream(req.Body, isGzipped, func(rows []parser.Row) error {
return stream.Parse(req.Body, isGzipped, func(rows []vmimport.Row) error {
return insertRows(at, rows)
})
}
func insertRows(at *auth.Token, rows []parser.Row) error {
func insertRows(at *auth.Token, rows []vmimport.Row) error {
ctx := netstorage.GetInsertCtx()
defer netstorage.PutInsertCtx(ctx)

View file

@ -587,6 +587,9 @@ func (pts *packedTimeseries) Unpack(dst *Result, tbfs []*tmpBlocksFile, tr stora
dedupInterval := storage.GetDedupInterval()
mergeSortBlocks(dst, sbh, dedupInterval)
seriesUpdateSbss, err := pts.unpackUpdateAddrs(tbfs, tr)
if err != nil {
return fmt.Errorf("cannot unpack series updates: %w", err)
}
// apply updates
if len(seriesUpdateSbss) > 0 {
var updateDst Result