wu-sheng commented on issue #13454:
URL: https://github.com/apache/skywalking/issues/13454#issuecomment-3907304468

   I have been working on the virtual thread support for OAP server. Here is 
the summary of planned changes (PR coming soon):
   
   ### Virtual Thread Support for gRPC & HTTP Servers (JDK 25+)
   
   **Approach:** Runtime reflection-based detection — zero compile-time 
dependency on JDK 25 APIs, fully backward compatible with JDK 11/17/21.
   
   **Why JDK 25 (not 21)?** JDK 21-23 has a critical `synchronized` pinning 
issue ([JEP 491](https://openjdk.org/jeps/491) fix lands in JDK 24). JDK 24 is 
non-LTS (6-month support). JDK 25 LTS (September 2025) is the first 
production-ready LTS with the fix.
   
   **What changes:**
   
   | Thread Pool | JDK < 25 (unchanged) | JDK 25+ |
   |---|---|---|
   | gRPC handler (`core-grpc`, `receiver-grpc`, `als-grpc`, `ebpf-grpc`) | 
Cached platform threads (unbounded) | Virtual threads (per-task) |
   | HTTP blocking (`core-http`, `receiver-http`, `promql-http`, `logql-http`, 
`zipkin-query-http`, `zipkin-http`, `firehose-http`) | Cached platform threads 
(max 200/server) | Virtual threads (per-task) |
   | Netty/Armeria I/O event loops | Platform threads | Unchanged |
   
   **Key implementation details:**
   - New `VirtualThreads` utility class handles all reflection-based detection 
and executor creation
   - Custom `VirtualThreadScheduledExecutor` wraps virtual threads as 
`ScheduledExecutorService` for Armeria compatibility
   - All virtual threads are named (`vt:{poolName}-{number}`) for 
monitoring/debugging
   - Disable via `SW_VIRTUAL_THREADS_ENABLED=false` environment variable
   - Default Docker image upgraded from JDK 11 to JDK 25; JDK 11/17/21 variants 
still available
   
   This covers the virtual thread part of this issue. ZGC adoption can be 
addressed separately (JVM flag configuration).
   
   cc @kezhenxu94 @wankai123 FYI


-- 
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]

Reply via email to