wu-sheng opened a new pull request, #13705:
URL: https://github.com/apache/skywalking/pull/13705

   ### Add virtual thread support for gRPC and Armeria HTTP server handler 
threads (JDK 25+)
   - [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
   - [x] Update the documentation to include this new feature.
   - [x] Tests(including UT, IT, E2E) are added to verify the new feature.
   - [ ] If it's UI related, attach the screenshots below.
   
   **Design summary:**
   
   Uses runtime reflection to detect JDK 25+ virtual thread APIs — zero 
compile-time
   dependency, fully backward compatible with JDK 11/17/21. JDK 25 is required 
(not 21)
   because JDK 21-23 has a critical `synchronized` pinning bug fixed by
   [JEP 491](https://openjdk.org/jeps/491) in JDK 24, and JDK 25 is the first 
LTS with
   that fix.
   
   | Thread Pool | JDK < 25 (unchanged) | JDK 25+ |
   |---|---|---|
   | gRPC server handler (`core-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 |
   
   On JDK 25+, all gRPC/HTTP handler pools share ~9 ForkJoinPool carrier 
threads instead
   of up to 800+ platform threads.
   
   **Key components:**
   - `VirtualThreads` — reflection-based detection & executor factory
   - `VirtualThreadScheduledExecutor` — wraps virtual threads as 
`ScheduledExecutorService` for Armeria
   - Docker default image changed from JDK 11 to JDK 25; JDK 11/17/21 variants 
remain
   - Disable via `SW_VIRTUAL_THREADS_ENABLED=false`
   
   - [x] If this pull request closes/resolves/fixes an existing issue, replace 
the issue number. Closes #13454.
   - [x] Update the [`CHANGES` 
log](https://github.com/apache/skywalking/blob/master/docs/en/changes/changes.md).


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