Aias00 commented on PR #6414: URL: https://github.com/apache/shenyu/pull/6414#issuecomment-5138305769
I found one issue that should be addressed before merging. `AbstractHttpClientPlugin#getCachedRequestBody` now uses `DataBufferUtils.join(exchange.getRequest().getBody())` for every retriable non-GET/HEAD request, then copies the whole body into a cached `byte[]` before the first upstream attempt. That fixes replay, but it also changes retry-enabled requests from streaming to full in-memory buffering with no size limit. For large/chunked uploads, this can hold the gateway request until the client finishes sending the whole body and can create an unbounded heap spike whenever `httpRetry > 0`. This path also does not appear to enforce the existing `shenyu.httpclient.maxInMemorySize` limit used by the WebClient configuration. Could we gate this replay cache behind a max byte limit, disable retry/replay for streaming or unknown-size bodies, or otherwise reuse the module's existing max-body setting? I would also add a failover retry test, since the PR changes the `DefaultRetryStrategy.resend(...)` body path but the new test coverage only exercises the current retry strategy. -- 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]
