Skip to content

Commit

Permalink
print plan replayer error instead throw it (#160)
Browse files Browse the repository at this point in the history
* fix

* fix
  • Loading branch information
Yisaer authored Feb 2, 2023
1 parent 97009c9 commit ba96e1e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ch/workload.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"database/sql"
"fmt"
"os"
"sort"
"strings"
"time"
Expand Down Expand Up @@ -219,7 +220,7 @@ func (w *Workloader) Run(ctx context.Context, threadID int) error {
if w.cfg.EnablePlanReplayer && w.cfg.Driver == "mysql" {
err := w.dumpPlanReplayer(ctx, s, query, queryName)
if err != nil {
return err
fmt.Fprintf(os.Stderr, "dump query %s plan replayer failed %v", queryName, err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion rawsql/workload.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (w *Workloader) Run(ctx context.Context, threadID int) error {
if w.cfg.EnablePlanReplayer {
err := w.dumpPlanReplayer(ctx, s, query, queryName)
if err != nil {
return err
fmt.Fprintf(os.Stderr, "dump query %s plan replayer failed %v", queryName, err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion tpch/workload.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func (w *Workloader) Run(ctx context.Context, threadID int) error {
if w.cfg.EnablePlanReplayer && w.cfg.Driver == "mysql" {
err := w.dumpPlanReplayer(ctx, s, query, queryName)
if err != nil {
return err
fmt.Fprintf(os.Stderr, "dump query %s plan replayer failed %v", queryName, err)
}
}

Expand Down

0 comments on commit ba96e1e

Please sign in to comment.