You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] dubbo.protocol.triple.max-message-size is only read from OS environment variables #16517
3.3 branch (ae809de), OpenJDK 21, macOS. The setting was added in #15781 and has not been released yet.
Steps to reproduce this issue
dubbo.protocol.triple.max-message-size (added in #15781, also exposed as TripleConfig#maxMessageSize) is read in LengthFieldStreamingDecoder, Gzip and Bzip2 with:
dubbo.protocol.triple.max-message-size=1024 in dubbo.properties
succeeds, limit ignored
dubbo.protocol.triple.max-message-size=1024 in Spring Boot application.properties
succeeds, limit ignored
TripleConfig#setMaxMessageSize(1024) on the ProtocolConfig
succeeds, limit ignored
The same applies in the other direction: an application that needs messages above the 50 MB default can only raise the limit through an environment variable.
What you expected to happen
The limit should take effect when it is set as a system property, in dubbo.properties or in Spring Boot properties, like the other dubbo.protocol.triple.* keys that are read without a URL (rest.json-framework in HttpJsonUtils, rest.disallowed-content-types in CodecUtils, verbose, rest.enabled and rest.openapi.enabled in TripleProtocol). Those all use ConfigurationUtils.getGlobalConfiguration(...).
Anything else
Switching the three places to getGlobalConfiguration covers system properties, environment variables, the config center, Spring Boot properties and dubbo.properties. It would not cover a limit set only programmatically through TripleConfig#setMaxMessageSize: the decoder and the decompressors are created without access to the protocol config, and the other keys listed above have the same limitation.
Are you willing to submit a pull request to fix on your own?
Yes I am willing to submit a pull request on my own!
Activity