pingcap/tidb

Dumpling will stuck while it's expect to fallback to LOCK TABLES when FTWRL blocking for a long time

Open

#56.838 aberto em 25 de out. de 2024

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)Go (6.186 forks)batch import
good first issuetype/enhancement

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

Enhancement

in https://github.com/pingcap/tidb/pull/36576 I want to implement a fallback strategy. But in line 1420 dumpling does not use the context with timeout https://github.com/pingcap/tidb/blob/7ce5bd752f668b4037a25ded97752f3eca258100/dumpling/export/dump.go#L1409-L1422

So current behaviour is, when upstream reports error like unsupported statement for FLUSH TABLE WITH READ LOCK, dumplling will fallback to LOCK TABLES. When upstream supports it but due to active sessions or other reason FTWRL is blocking, dumpling will stuck.

Maybe in the latter case it's also acceptable to fallback?

Guia do colaborador