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.
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.
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.
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:
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.