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

Expose exec pool work queue size metrics #4344

Closed
wants to merge 6 commits into from

Conversation

turboFei
Copy link
Member

@turboFei turboFei commented Feb 16, 2023

Why are the changes needed?

It can help to know the backend pressure if the exec pool is full.

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible

  • Add screenshots for manual tests if appropriate

  • Run test locally before make a pull request

@turboFei turboFei changed the title Wait queue Expose exec pool work queue size metrics Feb 16, 2023
@turboFei turboFei added this to the v1.7.0 milestone Feb 16, 2023
@bowenliang123
Copy link
Contributor

Good to have the queue size metrics exposed. But where do we have the work queue concept?
As the metrics come from the queue size in execPool, is it good enough to have exec.pool.queue.size as metric name instead?

@turboFei
Copy link
Member Author

I think work queue should be fine, it is a normal concept in ThreadPoolExecutor.

    /**
     * The queue used for holding tasks and handing off to worker
     * threads.  We do not require that workQueue.poll() returning
     * null necessarily means that workQueue.isEmpty(), so rely
     * solely on isEmpty to see if the queue is empty (which we must
     * do for example when deciding whether to transition from
     * SHUTDOWN to TIDYING).  This accommodates special-purpose
     * queues such as DelayQueues for which poll() is allowed to
     * return null even if it may later return non-null when delays
     * expire.
     */
    private final BlockingQueue<Runnable> workQueue;

@turboFei turboFei self-assigned this Feb 16, 2023
@bowenliang123
Copy link
Contributor

bowenliang123 commented Feb 16, 2023

OK. Just to mention it as we don't have work queue in kyuubi level, and bring it from lower level.

@turboFei
Copy link
Member Author

thanks all, merging to master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants