ngaut / unistore

A fun project for evaluating some new optimizations quickly, do not use it in production
Apache License 2.0
115 stars 48 forks source link

fast analyze blocking #335

Closed coocood closed 4 years ago

coocood commented 4 years ago

When enable fast analyze, analyzing tpcc.bmsql_stock table, tidb gorutine blocked forever on this line

1 @ 0x431170 0x404f5b 0x404f31 0x404d15 0x15e820a 0x15ec88e 0x15e6913 0x15e3946 0x45ef41
#   0x15e8209   github.com/pingcap/tidb/executor.(*AnalyzeFastExec).buildSampTask+0x679 /Users/zhou/gorepo/src/github.com/pingcap/tidb/executor/analyze.go:768
#   0x15ec88d   github.com/pingcap/tidb/executor.(*AnalyzeFastExec).buildStats+0x1ad    /Users/zhou/gorepo/src/github.com/pingcap/tidb/executor/analyze.go:1140
#   0x15e6912   github.com/pingcap/tidb/executor.analyzeFastExec+0x42           /Users/zhou/gorepo/src/github.com/pingcap/tidb/executor/analyze.go:539
#   0x15e3945   github.com/pingcap/tidb/executor.(*AnalyzeExec).analyzeWorker+0x375 /Users/zhou/gorepo/src/github.com/pingcap/tidb/executor/analyze.go:201

Need to investigate if it is a TiDB bug or a Unistore bug.

coocood commented 4 years ago

Need to implement debug service to support fast analyze https://github.com/pingcap/kvproto/blob/master/proto/debugpb.proto#L26

coocood commented 4 years ago

fixed by https://github.com/ngaut/unistore/pull/382