pingcap/tidb

Analyze process should stop once the table is truncated or dropped

Open

#9.300 aberto em 14 de fev. de 2019

Ver no GitHub
 (5 comments) (0 reactions) (0 assignees)Go (6.186 forks)batch import
challenge-programhelp wantedsig/executiontype/feature-request

Métricas do repositório

Stars
 (40.090 stars)
Métricas de merge de PR
 (Mesclagem média 14d 4h) (346 fundiu PRs em 30d)

Description

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

Constructing a large table whose analyze process would last long. Analyze the table then drop it. Then GC is invoked and sends UnsafeDestroyRange to TiKV to clean up the data of this table. But during the cleanup, the analyze process would read incompletely data which leads to TiKV panic.

  1. What did you expect to see?

Analyze process should stop once the table is truncated or dropped.

  1. What did you see instead?

From TiKV log, we can see that the table is already truncated but the analyze process is still in working.

2019/02/13 20:27:50.999 INFO gc_worker.rs:345: unsafe destroy range start_key: t\200\000\000\000\000\000\000\377\201\000\000\000\000\000\000\000\370, end_key: t\200\000\000\000\000\000\000\377\202\000\000\000\000\000\000\000\370 finished cleaning up all, cost time 2.700992685s
2019/02/13 20:27:55.281 INFO analyze.rs:127: analyze handle column range [start: "t\200\000\000\000\000\000\000\201_r\200\000\000\000\006m\206\312" end: "t\200\000\000\000\000\000\000\201_r\200\000\000\000\006s\027|"]
  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?

v2.1.1

SIG slack channel

#sig-exec

Score

300

Mentor

  • @lzmhhh123

Guia do colaborador