pingcap / pingcap/tidb-operator
Avoid using temporary storage of slow-log tailer
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1.3k
- Forks
- 540
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 18
Description
Feature Request
Is your feature request related to a problem? Please describe:
Currently, the slow-log tailer requires the tidb-server output slow logs to a temporary dir and tail it to its STDOUT. However, this approach would consume ephemeral storage and may cause tidb-server being evicted under Disk Pressure.
Describe the feature you'd like:
Use pipe to transfer the slow log instead:
# tidb process
> mkfifo slow.log
> ./tidb-server --log-slow-query slow.log
# slow log tailer
> cat slow.log
Pipe does not consume any filesystem storage. We may lose slow logs if the tailer is abnormal, but this can hardly happen since the tailer is as simple as a single cat process.
Describe alternatives you've considered:
N/A
Teachability, Documentation, Adoption, Migration Strategy:
This would be change that requires rolling-restart of tidb-servers, if we think rolling-restarting tidb-servers should be avoided when upgrading tidb-operator, we can add an feature-gate and let the user enable is actively.
Contributor 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.
Research direction
The issue identifies the slow-log tailer, tidb-server output, temporary storage, and a FIFO/cat-based approach, but names no repository files or tests. Start by locating the slow-log tailer and tidb-server configuration paths, then trace how rolling restarts and any feature gates are handled; done means slow logs can be transferred without temporary filesystem storage and the upgrade behavior is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100