Aias00 opened a new issue, #7443:
URL: https://github.com/apache/shenyu/issues/7443

   ## Is there an existing issue for this?
   
   - [x] I searched existing open and closed issues.
   
   ## Current Behavior
   
   The Apache HttpClient SDK implementation reads the property 
`http.connectionRequestTimeOut ` with a trailing space. Setting the ordinary 
key `http.connectionRequestTimeOut` has no effect, and the default of 2000 
milliseconds is passed to `RequestConfig.setConnectionRequestTimeout()`.
   
   ## Expected Behavior
   
   `http.connectionRequestTimeOut` should control the time spent waiting to 
lease a pooled connection, consistently with the adjacent SDK HTTP properties.
   
   ## Steps To Reproduce
   
   1. Select the SDK Apache HttpClient transport.
   2. Initialize its properties with `http.connectionRequestTimeOut=50`.
   3. Inspect the resulting client's 
`requestConfig.getConnectionRequestTimeout()`.
   4. Observe `2000` instead of `50`.
   
   The property lookup itself reproduces the typo:
   
   ```java
   Properties props = new Properties();
   props.setProperty("http.connectionRequestTimeOut", "50");
   System.out.println(props.getProperty("http.connectionRequestTimeOut ", 
"2000"));
   // 2000
   ```
   
   ## Environment
   
   ShenYu `2.7.2-SNAPSHOT`, `master` at 
`67596c1d228b62da75cd0a0ecb47d0ac5d995384`, Java 17.
   
   ## Location And Impact
   
   
[HttpShenyuSdkClient.java:81](https://github.com/apache/shenyu/blob/67596c1d228b62da75cd0a0ecb47d0ac5d995384/shenyu-sdk/shenyu-sdk-httpclient/src/main/java/org/apache/shenyu/sdk/httpclient/HttpShenyuSdkClient.java#L81).
   
   Severity: Low. Confidence: high. Under connection-pool saturation, operators 
cannot tune the intended connection lease wait. A requested shorter wait can 
silently become two seconds, adding avoidable latency and occupied caller 
resources.
   
   ## Suggested Fix And Regression Coverage
   
   Remove the trailing space from the primary key. Consider accepting the 
legacy typo key as a fallback if needed for compatibility. Add an 
initialization test that supplies the ordinary key and asserts the effective 
`RequestConfig` timeout, plus a default-value test.
   
   ## Validation And Related Issues
   
   SDK HttpClient targeted tests with the current reactor dependencies (`-am`) 
passed 6 tests with zero failures. An independent verifier confirmed the key 
mismatch. Existing tests do not assert this property override. No 
saturated-pool end-to-end load test was run.
   
   #6582 concerns a gateway HTTP proxy response timeout, while #6853/#6854 
concern SDK retry/shutdown behavior. No matching SDK connection-request timeout 
typo issue was found.
   


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