From 8335850137041b2eebf5503387b704a4aa833cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toni=20Ram=C3=ADrez?= <58293609+ToniRamirezM@users.noreply.github.com> Date: Mon, 4 Nov 2024 14:55:19 +0100 Subject: [PATCH] fix query DS by batch (#3803) --- tools/datastreamer/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/datastreamer/main.go b/tools/datastreamer/main.go index 78f7b5542c..5c6deb3b09 100644 --- a/tools/datastreamer/main.go +++ b/tools/datastreamer/main.go @@ -685,8 +685,9 @@ func decodeBatch(cliCtx *cli.Context) error { batchData = append(batchData, entry.Encode()...) i := uint64(1) //nolint:gomnd + start := entry.Number for { - entry, err := client.ExecCommandGetEntry(entry.Number + i) + entry, err := client.ExecCommandGetEntry(start + i) if err != nil { log.Error(err) os.Exit(1) @@ -760,8 +761,9 @@ func decodeBatchOffline(cliCtx *cli.Context) error { i := uint64(1) //nolint:gomnd printEntry(entry, shouldPrintJson) batchData = append(batchData, entry.Encode()...) + start := entry.Number for { - entry, err = streamServer.GetEntry(entry.Number + i) + entry, err = streamServer.GetEntry(start + i) if err != nil { log.Error(err) os.Exit(1)