Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bench command retry publication when pub ack future is an error #1193

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cli/bench_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ func (c *benchCmd) jspubAction(_ *fisk.ParseContext) error {
var err2 error
for i := 0; i < c.numClients; i++ {
if err := <-errChan; err != nil {
log.Printf("Error from client %d: %v", i, err)
log.Printf("Fatal error from client %d: %v", i, err)
// only return the first error since only one error can be returned
if err2 == nil {
err2 = err
Expand Down Expand Up @@ -1649,7 +1649,7 @@ func (c *benchCmd) jsPublisher(nc *nats.Conn, progress *uiprogress.Bar, msg []by
case <-futures[future].Ok():
i++
case err := <-futures[future].Err():
return fmt.Errorf("publish acknowledgement: %w", err)
fmt.Println(fmt.Errorf("publish acknowledgement is an error: %w (retrying)", err).Error())
}
}
case <-time.After(c.jsTimeout):
Expand Down
Loading