pingcap/tidb

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

Open

#19 130 ouverte le 11 août 2020

Voir sur GitHub
 (3 commentaires) (0 réactions) (0 assignés)Go (6 186 forks)batch import
challenge-programcomponent/executorhelp wantedsig/executiontype/question

Métriques du dépôt

Stars
 (40 090 stars)
Métriques de merge PR
 (Merge moyen 14j 4h) (346 PRs mergées en 30 j)

Description

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

Guide contributeur