mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmstorage/transport: call vmselectRequestCtx.readSearchQuery() in processVMSelectDeleteMetrics
Previously the processVMSelectDeleteMetrics was calling separate functions from readSearchQuery(). It is better from readability and maintenance PoV to substitute it with readSearchQuery call.
This commit is contained in:
parent
270ad39359
commit
b2cfb8faf7
1 changed files with 2 additions and 11 deletions
|
@ -590,21 +590,12 @@ func (s *Server) processVMSelectRegisterMetricNames(ctx *vmselectRequestCtx) err
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
const maxTagFiltersSize = 64 * 1024
|
|
||||||
|
|
||||||
func (s *Server) processVMSelectDeleteMetrics(ctx *vmselectRequestCtx) error {
|
func (s *Server) processVMSelectDeleteMetrics(ctx *vmselectRequestCtx) error {
|
||||||
vmselectDeleteMetricsRequests.Inc()
|
vmselectDeleteMetricsRequests.Inc()
|
||||||
|
|
||||||
// Read request
|
// Read request
|
||||||
if err := ctx.readDataBufBytes(maxTagFiltersSize); err != nil {
|
if err := ctx.readSearchQuery(); err != nil {
|
||||||
return fmt.Errorf("cannot read labelName: %w", err)
|
return err
|
||||||
}
|
|
||||||
tail, err := ctx.sq.Unmarshal(ctx.dataBuf)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("cannot unmarshal SearchQuery: %w", err)
|
|
||||||
}
|
|
||||||
if len(tail) > 0 {
|
|
||||||
return fmt.Errorf("unexpected non-zero tail left after unmarshaling SearchQuery: (len=%d) %q", len(tail), tail)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup ctx.tfss
|
// Setup ctx.tfss
|
||||||
|
|
Loading…
Reference in a new issue