Skip to content

Commit

Permalink
set GC worker and loadDeleteRangeSQL high priority (#6450)
Browse files Browse the repository at this point in the history
  • Loading branch information
coocood authored and zhangjinpeng87 committed May 7, 2018
1 parent 4eb0c1a commit 1da01ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ddl/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

const (
loadDeleteRangeSQL = `SELECT job_id, element_id, start_key, end_key FROM mysql.gc_delete_range WHERE ts < %v ORDER BY ts`
loadDeleteRangeSQL = `SELECT HIGH_PRIORITY job_id, element_id, start_key, end_key FROM mysql.gc_delete_range WHERE ts < %v ORDER BY ts`
completeDeleteRangeSQL = `DELETE FROM mysql.gc_delete_range WHERE job_id = %d AND element_id = %d`
updateDeleteRangeSQL = `UPDATE mysql.gc_delete_range SET start_key = "%s" WHERE job_id = %d AND element_id = %d AND start_key = "%s"`
)
Expand Down
2 changes: 1 addition & 1 deletion store/tikv/gcworker/gc_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ func (w *GCWorker) loadDurationWithDefault(key string, def time.Duration) (*time

func (w *GCWorker) loadValueFromSysTable(key string, s session.Session) (string, error) {
ctx := context.Background()
stmt := fmt.Sprintf(`SELECT (variable_value) FROM mysql.tidb WHERE variable_name='%s' FOR UPDATE`, key)
stmt := fmt.Sprintf(`SELECT HIGH_PRIORITY (variable_value) FROM mysql.tidb WHERE variable_name='%s' FOR UPDATE`, key)
rs, err := s.Execute(ctx, stmt)
if len(rs) > 0 {
defer terror.Call(rs[0].Close)
Expand Down

0 comments on commit 1da01ea

Please sign in to comment.