chaojixinren opened a new pull request, #3462:
URL: https://github.com/apache/dubbo-go/pull/3462
### Description
Investigate whether connect-go v1.19.2's fix for the concurrent `Send` +
`CloseAndReceive` nil-pointer dereference (connectrpc/connect-go#919)
applies to
Dubbo-go's forked Triple runtime under `protocol/triple/triple_protocol`.
**Conclusion: `duplexHTTPCall` is not affected.** `newDuplexHTTPCall`
allocates
the request-body `io.Pipe` at construction and never reassigns
`requestBodyWriter`, so it is always non-nil and concurrent
`Write`/`CloseWrite`
are safe in any order. The upstream race — where the pipe was created lazily
on
the first `Send` and a racing `CloseWrite` could leave it nil — is
structurally
impossible here, so no synchronization change is ported.
What this PR does:
- adds `TestDuplexHTTPCallConcurrentWriteAndCloseWrite` and
`TestDuplexHTTPCallConcurrentWriteCloseRace` as regression guards (pass
under
`go test -race`) that pin the construction-time pipe invariant
- documents the invariant on `requestBodyWriter` to keep the allocation out
of a
lazy/first-send path
This is intentionally not a broad connect-go upgrade; it only checks and
guards
the runtime safety property called out in the issue.
Fixes #3458
### Checklist
- [x] I confirm the target branch is `develop`
- [x] Code has passed local testing
- [x] I have added tests that prove my fix is effective or that my feature
works
--
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]