Skip to content
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

Remove "reset" method of ScheduledTaskRoutine to fix bugs #369

Merged
merged 4 commits into from
Dec 6, 2022

Conversation

dxsup
Copy link
Member

@dxsup dxsup commented Nov 25, 2022

Description

Due to the incorrect usage of "time.Timer", the scheduled routines may block the main thread. After reviewing the code, I found the "reset" method which incorrectly uses "time.Timer" also introduces a bug when exporting cpuEvents to files. This method is unnecessary any more, so I delete it. This can resolve two bugs together.

Related Issue

#370

@NeJan2020 NeJan2020 linked an issue Nov 25, 2022 that may be closed by this pull request
@NeJan2020 NeJan2020 added the area/collector Issues or PRs related to agent metric collector label Nov 25, 2022
@dxsup dxsup force-pushed the fix/timer-block branch 3 times, most recently from 43ceaa2 to 14a6e45 Compare December 5, 2022 07:15
@dxsup dxsup requested review from hocktea214 and NeJan2020 December 6, 2022 01:33
hocktea214
hocktea214 previously approved these changes Dec 6, 2022
Daxin Wang added 4 commits December 6, 2022 09:42
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
… of "timer"

Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
@dxsup dxsup merged commit 47be8af into KindlingProject:main Dec 6, 2022
@dxsup dxsup deleted the fix/timer-block branch December 6, 2022 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/collector Issues or PRs related to agent metric collector
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect usage of Timer can cause thread blocking
3 participants