Copilot commented on code in PR #7663:
URL: https://github.com/apache/kyuubi/pull/7663#discussion_r3888485499


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiTHttpFrontendService.scala:
##########
@@ -98,14 +98,19 @@ final class KyuubiTHttpFrontendService(
       val minThreads = conf.get(FRONTEND_THRIFT_MIN_WORKER_THREADS)
       val maxThreads = conf.get(FRONTEND_THRIFT_MAX_WORKER_THREADS)
       val keepAliveTime = conf.get(FRONTEND_THRIFT_WORKER_KEEPALIVE_TIME)
-      val executor = new ThreadPoolExecutor(
-        minThreads,
-        maxThreads,
-        keepAliveTime,
-        TimeUnit.MILLISECONDS,
-        new SynchronousQueue[Runnable](),
-        new NamedThreadFactory(getName + "HttpHandler-Pool", false))
-      val threadPool = new ExecutorThreadPool(executor)
+      val useVirtualThreads = 
conf.get(FRONTEND_THRIFT_HTTP_VIRTUAL_THREADS_ENABLED)
+      val threadPool: ThreadPool = if (useVirtualThreads) {
+        new VirtualThreadPool(maxThreads, getName + "HttpHandler")

Review Comment:
   The new adapter is only exercised directly; no test starts the Thrift HTTP 
frontend with this switch enabled and sends a request through Jetty. That 
leaves the `ThreadPool.SizedThreadPool` integration (Jetty thread budgeting, 
connector startup, dispatch, and shutdown) unverified. Please add a 
JDK-21-gated Thrift HTTP frontend test using this configuration; the existing 
HTTP operation suites provide the end-to-end fixture.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to