pingcap/tidb

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

Open

#19,130 创建于 2020年8月11日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)Go (6,186 fork)batch import
challenge-programcomponent/executorhelp wantedsig/executiontype/question

仓库指标

Star
 (40,090 star)
PR 合并指标
 (平均合并 14天 4小时) (30 天内合并 346 个 PR)

描述

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

贡献者指南