shivvani-r opened a new pull request, #15984:
URL: https://github.com/apache/dubbo/pull/15984

   ## What is the purpose of the change
   
   This PR addresses **[Issue 
#15969](https://github.com/apache/dubbo/issues/15969)**.
   
   Currently, `FixedThreadPool` silently creates an unbounded 
`MemorySafeLinkedBlockingQueue` (capacity `Integer.MAX_VALUE`) when `queues` is 
configured to a negative value (e.g., `-1`). This poses a stability risk 
(OutOfMemoryError) without the user being aware of the danger.
   
   This PR improves observability by logging a **WARN** message when this 
configuration is detected.
   
   **Note to Reviewers:**
   I implemented **Option 1** (Warning Log) from the issue description because 
it is safer and preserves backward compatibility for users currently relying on 
negative values. 
   
   ## Brief changelog
   
   * **FixedThreadPool.java:** Added a `WARN` log when `queues < 0` is 
detected, explicitly warning the user about the unbounded queue risk.
   * **FixedThreadPoolTest.java:** Added 
`testNegativeQueuesCreatesUnboundedQueue` to verify that negative configuration 
correctly instantiates the `MemorySafeLinkedBlockingQueue` (preserving backward 
compatibility) while triggering the new warning path.


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