sessiontxn: deadlock retry log does not follow tidb_redact_log
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go
- Domain
- observability, security
Research direction
Start from the two named log sites in pkg/sessiontxn/isolation/repeatable_read.go and pkg/sessiontxn/isolation/readcommitted.go, where lockKey is logged with zap.Stringer. Read how the earlier redaction fixes in #71922 and #72544 apply the session's tidb_redact_log setting, then make both deadlock-retry log calls follow the same pattern. Done means the RR and RC retry logs redact lockKey when redaction is enabled, with matching tests or existing sessiontxn tests passing.
Written by the indexing model from the issue text.
Description
Bug Report
1. Minimal reproduce step (Required)
- Set
tidb_redact_log = ONfor the session. - Trigger a retryable single-statement deadlock in a pessimistic RR or RC transaction.
- Check the INFO log
single statement deadlock, retry statement.
Reported on v8.5.8 and confirmed by source inspection. A standalone SQL reproducer is not attached.
2. What did you expect to see? (Required)
The lockKey field should follow the session's tidb_redact_log setting.
3. What did you see instead (Required)
lockKey still contains the original hexadecimal key. Both providers use zap.Stringer("lockKey", kv.Key(deadlock.LockKey)), which does not apply redaction.
Related: #59279. The fixes in #71922 and #72544 do not cover these two log sites.
4. What is your TiDB version? (Required)
v8.5.8 (8b857efa20363d50a8fa2ea7dd9809a85a61b115). Also present in checked release-8.5 (8a112b0a8bba) and master (095cb8b517b0).
- Dominant language
- Go
- Stars
- 40.7k
- Forks
- 6.3k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 291
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pingcap/tidb
-
INTERVAL() over nullable INT columns uses binary search because builtinIntervalIntSig.Clone drops hasNullablePossibly taken @linzch3 claimed this 1 day ago. Opencontribution
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pingcap/tidb#73150 · 2 comments ·
Maintainers usually reply within 1 day
-
SHOW INDEX on a sequence fails with SELECT command denied, even for root (v8.5.6+)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
SUBDATE with a DECIMAL date argument larger than int64 fails with error 1690 in TiDB but yields a warning and NULL in TiKVMay be free again A pull request for this issue was closed without being merged. Opencontribution
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
DATE_ADD with an INTERVAL string ending in U+00A0: TiDB accepts it, TiKV coprocessor fails with 'Data Truncated' (error 1105) under strict modeMay be free again A pull request for this issue was closed without being merged. Opencontribution
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Vectorized ILIKE swallows an error raised while evaluating a constant ESCAPE argument, row-based evaluation reports itPossibly taken @gaurav0107 claimed this 11 days ago. Opencontribution
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
area/networking kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
siderolabs/talos#14972 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
kubectl wait outputs cryptic "error: unrecognized condition: []" when --for is omittedPossibly taken @muskan-creates352 claimed this today. Openkind/bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
kubernetes/kubectl#1910 · 1 comment ·
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
stacklok/toolhive-catalog#1967 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
unbound-force/gaze#353 ·
Maintainers usually reply within 1 day