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

SegmentReadTaskScheduler waste too many CPU #6495

Closed
JinheLin opened this issue Dec 16, 2022 · 0 comments · Fixed by #6496
Closed

SegmentReadTaskScheduler waste too many CPU #6495

JinheLin opened this issue Dec 16, 2022 · 0 comments · Fixed by #6496

Comments

@JinheLin
Copy link
Contributor

Bug Report

image

The reason is that:

  • scheduleSegmentReadTaskPoolUnlock does not check the limit on the number of active segments. If the number of active segments has reached the limit, this causes scheduleSegmentUnlock to fail to schedule a segment.
  • When scheduleSegmentUnlock scheduling fails, the scheduler will immediately execute the next scheduling because there may be other segmentReadTaskPools to schedule.
  • If there are no tasks to schedule, this will cause the scheduling to keep executing between scheduleSegmentReadTaskPoolUnlock and scheduleSegmentUnlock.
@flowbehappy flowbehappy added type/enhancement Issue or PR for enhancement and removed type/bug Issue for bug labels Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants