diff --git a/app/vmctl/vm_native.go b/app/vmctl/vm_native.go index 49fbcda806..cb876dcb7a 100644 --- a/app/vmctl/vm_native.go +++ b/app/vmctl/vm_native.go @@ -125,13 +125,10 @@ func (p *vmNativeProcessor) runSingle(ctx context.Context, f native.Filter, srcU } pr, pw := io.Pipe() - done := make(chan struct{}) + importCh := make(chan error) go func() { - defer func() { close(done) }() - if err := p.dst.ImportPipe(ctx, dstURL, pr); err != nil { - logger.Errorf("error initialize import pipe: %s", err) - return - } + importCh <- p.dst.ImportPipe(ctx, dstURL, pr) + close(importCh) }() w := io.Writer(pw) @@ -153,9 +150,8 @@ func (p *vmNativeProcessor) runSingle(ctx context.Context, f native.Filter, srcU if err := pw.Close(); err != nil { return err } - <-done - return nil + return <-importCh } func (p *vmNativeProcessor) runBackfilling(ctx context.Context, tenantID string, ranges [][]time.Time, silent bool) error { diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 1bc153e598..9b3c51b1a7 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -33,6 +33,7 @@ The sandbox cluster installation is running under the constant load generated by * BUGFIX: `vmstorage`: added missing `-inmemoryDataFlushInterval` command-line flag, which was missing in [VictoriaMetrics cluster](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html) after implementing [this feature](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3337) in [v1.85.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.85.0). * BUGFIX: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): properly handle queries, which wrap [rollup functions](https://docs.victoriametrics.com/MetricsQL.html#rollup-functions) with multiple arguments without explicitly specified lookbehind window in square brackets into [aggregate functions](https://docs.victoriametrics.com/MetricsQL.html#aggregate-functions). For example, `sum(quantile_over_time(0.5, process_resident_memory_bytes))` was resulting to `expecting at least 2 args to ...; got 1 args' error. Thanks to @atykhyy for [the pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5414). +* BUGFIX: [vmctl](https://docs.victoriametrics.com/vmctl.html): retry on import errors in `vm-native` mode. Before, retries happened only on writes into a network connection between source and destination. But errors returned by server after all the data was transmitted were logged, but not retried. ## [v1.96.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.96.0)