pingcap/tidb

The point get executor and batch point get executor may not be thread safe

Open

#19.130 aperta il 11 ago 2020

Vedi su GitHub
 (3 commenti) (0 reazioni) (0 assegnatari)Go (6186 fork)batch import
challenge-programcomponent/executorhelp wantedsig/executiontype/question

Metriche repository

Star
 (40.090 star)
Metriche merge PR
 (Merge medio 14g 4h) (346 PR mergiate in 30 g)

Descrizione

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

Issue https://github.com/pingcap/tidb/issues/16817 says

I guess there may exist other problems / panics behind this single symptom described in this issue, because PointGet now may be
 running in parallel with other goroutines(not only the main goroutine in this case, but other goroutines, e.g, workers of IndexJoin 
/ IndexHashJoin?), while the original implementation of its execution seems not to consider the possibility of concurrent running?
 We'd better do a full check of these potential concurrent situations to make sure PointGet is safe there.

For batchPointGetExecutor, the init flag is set using atomic operations, but the index field is not. Maybe we need to do more checks and tests to ensure these two executors are thread-safe.

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

SIG slack channel

#sig-exec

Score

300

Mentor

  • @lzmhhh123

Guida contributor