Skip to content

Commit

Permalink
perf: speed up the update of ClickHouse table structure
Browse files Browse the repository at this point in the history
  • Loading branch information
lzf575 committed Aug 8, 2024
1 parent d3a3df2 commit 67bc401
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/ingester/ckissu/ckissu.go
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ func Query(connect *sql.DB, sql string) (*sql.Rows, error) {
retryTimes := RETRY_COUNT
for err != nil && retryTimes > 0 {
log.Warningf("Query SQL (%s) failed: %s, will retry", sql, err)
time.Sleep(200 * time.Millisecond)
time.Sleep(100 * time.Millisecond)
rows, err = connect.Query(sql)
if err == nil {
log.Infof("Retry query SQL (%s) success", sql)
Expand All @@ -908,7 +908,7 @@ func Exec(connect *sql.DB, sql string) (sql.Result, error) {
retryTimes := RETRY_COUNT
for err != nil && retryTimes > 0 {
log.Warningf("Exec SQL (%s) failed: %s, will retry", sql, err)
time.Sleep(time.Second)
time.Sleep(100 * time.Millisecond)
result, err = connect.Exec(sql)
if err == nil {
log.Infof("Retry exec SQL (%s) success", sql)
Expand Down

0 comments on commit 67bc401

Please sign in to comment.