File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ const (
54
54
LabelDDLSyncer = "ddl-syncer"
55
55
LabelGCWorker = "gcworker"
56
56
LabelAnalyze = "analyze"
57
+ LabelStats = "stats"
57
58
58
59
LabelBatchRecvLoop = "batch-recv-loop"
59
60
LabelBatchSendLoop = "batch-send-loop"
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import (
20
20
"github.com/pingcap/errors"
21
21
"github.com/pingcap/tidb/ddl/util"
22
22
"github.com/pingcap/tidb/kv"
23
+ "github.com/pingcap/tidb/metrics"
23
24
"github.com/pingcap/tidb/parser/ast"
24
25
"github.com/pingcap/tidb/parser/model"
25
26
"github.com/pingcap/tidb/parser/mysql"
@@ -28,13 +29,15 @@ import (
28
29
"github.com/pingcap/tidb/sessionctx/variable"
29
30
"github.com/pingcap/tidb/sessiontxn"
30
31
"github.com/pingcap/tidb/types"
32
+ tidbutil "github.com/pingcap/tidb/util"
31
33
"github.com/pingcap/tidb/util/logutil"
32
34
"github.com/pingcap/tidb/util/sqlexec"
33
35
"go.uber.org/zap"
34
36
)
35
37
36
38
// HandleDDLEvent begins to process a ddl task.
37
39
func (h * Handle ) HandleDDLEvent (t * util.Event ) error {
40
+ defer tidbutil .Recover (metrics .LabelStats , "handleDDLEvent" , nil , false )
38
41
switch t .Tp {
39
42
case model .ActionCreateTable , model .ActionTruncateTable :
40
43
ids := h .getInitStateTableIDs (t .TableInfo )
You can’t perform that action at this time.
0 commit comments