Cop worker got panicked when tidb_replica_read is closest-adaptive #60175
Labels
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.5
This bug affects the 7.5.x(LTS) versions.
affects-8.1
This bug affects the 8.1.x(LTS) versions.
affects-8.5
This bug affects the 8.5.x(LTS) versions.
affects-9.0
This bug affects the 9.0.x versions.
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
The minimal reproduce step is unknown. However, there is potential data race on
Request.MatchStoreLabels
when tidb_replica_read = closest-adaptive:kvReq
actually share the same&builder.Request
here, then data race may occur (eg. first req start cop worker and read the labels while the following reqs append the labels).Here is the demo test for the above case:
2. What did you expect to see? (Required)
No error reported.
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
v7.5.6
The text was updated successfully, but these errors were encountered: