-
Notifications
You must be signed in to change notification settings - Fork 411
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
The task in BackgroundProcessingPool is not run by fixed interval #6908
Comments
It is because the task handle with min_time will be poped to multiple worker threads. Though the task with tiflash/dbms/src/Storages/BackgroundProcessingPool.cpp Lines 173 to 190 in e1418dc
|
With a background pool with 10 threads, and one task expecting to run at 2 seconds intervals. It actually gets executed more than 35 times within 10 seconds. click expand to see the unit test
|
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Notice when testing #6899, also reported in #6816 (comment)
2. What did you expect to see? (Required)
The task which always returns
false
run with a fixed interval3. What did you see instead (Required)
The task get executed frequently by different threads in BackgroundProcessingPool
4. What is your TiFlash version? (Required)
master
The text was updated successfully, but these errors were encountered: