QiuYucheng2003 opened a new pull request, #17019:
URL: https://github.com/apache/iotdb/pull/17019

   ## Description
   This PR fixes issue #17016.
   
   As discussed in the issue, the `SessionPoolExample` currently uses 
`Executors.newFixedThreadPool(10)`, which internally employs an unbounded 
`LinkedBlockingQueue`. This can lead to `OutOfMemoryError` in high-throughput 
scenarios if users copy this example code into production.
   
   This PR replaces it with a `ThreadPoolExecutor` using a bounded 
`ArrayBlockingQueue` to provide backpressure and ensure system stability.
   
   ## Related Issue
   Fixes #17016
   
   ## Type of changes
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [x] Improvement (non-breaking change which improves an existing feature)
   
   ## Checklist:
   - [x] I have performed a self-review of my own code
   - [x] My changes generate no new warnings


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