-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error data input for date(CAST(value AS DATETIME)) causing high TiFlash sys CPU #5097
Comments
We should avoid using exception to pass error during function evaluation. We'd rather use return value to do that. |
@zanmato1984 before achieving this, how about not print stacktrace for normal exceptions (only let BaseDaemon print stacetrace)? Such information is almost useless for debuging if we print enough logs at the throw points. |
But here we don't print the stacktrace, it is the stack unwind that causes the hight sys cpu usage. |
@windtalker Yes that's what I meant, not print here also means not to unwind. |
@windtalker FYI, stacktrace unwind is disabled by default in my previous team (only enabled for fatal errors). |
…TiFlash sys CPU (pingcap#5477) close pingcap#5097
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
run a query include date(CAST(rv_EndDateTime.value AS DATETIME)), and make wrong input for the cast function. TiFlash need to do exception handle and capture the unwind(stack) information, which explain the high sys cpu.
with date(CAST(rv_EndDateTime.value AS DATETIME)), the query takes over 10 minutes, and causing TiFlash high sys CPU.
without date(CAST(rv_EndDateTime.value AS DATETIME)), the query take around 300 ms.
2. What did you expect to see? (Required)
no high cpu
3. What did you see instead (Required)
high TiFlash sys CPU
4. What is your TiFlash version? (Required)
v6.1
The text was updated successfully, but these errors were encountered: