Skip to content

Commit

Permalink
fix query DS by batch (#3803)
Browse files Browse the repository at this point in the history
  • Loading branch information
ToniRamirezM authored Nov 4, 2024
1 parent 596741e commit 8335850
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/datastreamer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

1 comment on commit 8335850

@rahaftiya11
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.