kyuubi icon indicating copy to clipboard operation
kyuubi copied to clipboard

[Improvement] Use dedicated ExecutionContext for EventBus async execution

Open pan3793 opened this issue 3 years ago • 2 comments

Code of Conduct

Search before asking

  • [X] I have searched in the issues and found no similar issues.

What would you like to be improved?

Currently, Kyuubi EventBus uses scala.concurrent.ExecutionContext.Implicits.global to execute async event handler. Generally, it's discouraged to use that global ec, instead, we should create dedicated ec for each workload.

How should we improve?

Use dedicated ExecutionContext for EventBus async execution

Are you willing to submit PR?

  • [ ] Yes. I can submit a PR independently to improve.
  • [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to improve.
  • [ ] No. I cannot submit a PR at this time.

pan3793 avatar Sep 18 '22 15:09 pan3793

What are the benefits of creating dedicated ec by self?

yikf avatar Sep 19 '22 12:09 yikf

In short, the global ec is out of control. It would be shared by the whole JVM, users or other components may use it to run heavy compute workloads, share the global ec may block others workloads or blocked by others. And, it's friendly for debugging if we separate the workloads into dedicated thread pools (ec) w/ unique thread names.

pan3793 avatar Sep 19 '22 17:09 pan3793