waterWang opened a new pull request, #18460: URL: https://github.com/apache/dolphinscheduler/pull/18460
## Description Fix #18459 — Add `maxFrameSize` check to `TransporterDecoder` to prevent OOM when processing large RPC responses. ### Problem `TransporterDecoder` allocates `new byte[bodyLength]` without any size validation. When a large task log response (>200MB) is received, the JVM can run out of memory attempting to allocate the byte array. ### Changes 1. **TransporterDecoder.java**: Added `maxFrameSize` field (default 100MB) with a configurable constructor. The `BODY_LENGTH` case now throws `IllegalArgumentException` if `bodyLength > maxFrameSize`. 2. **NettyServerConfig.java**: Added `maxFrameSize` field (default 100MB). 3. **NettyClientConfig.java**: Added `maxFrameSize` field (default 100MB). 4. **NettyRemotingServer.java**: Passes `serverConfig.getMaxFrameSize()` to the decoder. 5. **NettyRemotingClient.java**: Passes `clientConfig.getMaxFrameSize()` to the decoder. ### Note This PR addresses the OOM prevention (frame size guard). The second concern from the issue — streaming large task logs in chunks rather than a single RPC — is a separate enhancement and is not covered here. -- 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]
