EmptyCity-111 opened a new pull request, #3613:
URL: https://github.com/apache/dubbo-go/pull/3613
### Description
Related to #3598, task 5.
While tracing these settings, I found two configuration sources for the
Triple
server message-size limits: deprecated top-level fields in `ProtocolConfig`
and
the same fields under `TripleConfig`. `server/action.go` forwarded the
top-level
values as URL parameters, while the Triple server later applied the nested
configuration as an override. That made field ownership and precedence harder
to follow.
This change:
- keeps Triple-specific message-size settings only in `TripleConfig`;
- moves the `4mib` receive-size default to `TripleConfig` and aligns the
field
order used by `DefaultTripleConfig` and `Clone`;
- continues populating the legacy URL parameters from the nested
configuration,
so downstream protocol handling keeps its existing runtime input;
- updates the JSON Schema and regression tests to match the nested model.
### Compatibility
The runtime URL-parameter path remains available, but this removes the two
deprecated exported fields from `ProtocolConfig`. Code that still initializes
`ProtocolConfig.MaxServerSendMsgSize` or
`ProtocolConfig.MaxServerRecvMsgSize`
must move those values under `ProtocolConfig.TripleConfig`.
Those fields were previously annotated for removal in v4, while task 5 asks
to
converge the model now. I have left this PR as a draft so maintainers can
confirm
that the source-level removal is intended on the current `main` branch.
### Validation
The focused regression checks failed on the previous model because the fields
still existed on `ProtocolConfig` and `DefaultTripleConfig` did not own the
`4mib` default. They pass with this change.
```text
go test ./global -run
'TestProtocolConfigClone|TestProtocolConfigFields|TestTripleConfigClone|TestDefaultTripleConfig'
-count=1
go test . -run
'TestInstanceInit(AddsDefaultGlobalProtocolWhenEmpty|DefaultsExplicitTripleConfig)'
-count=1
go test ./server ./protocol/triple
go test ./...
go vet ./...
golangci-lint run ./... --timeout=10m
git diff --check
```
All checks pass; golangci-lint reports 0 issues. The updated schema also
parses
as valid JSON.
### Checklist
- [x] The target branch is `main`, the repository's current default branch
(the
template still mentions `develop`).
- [x] Code has passed local testing.
- [x] Tests cover the nested field ownership, default value, and cloning
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]