You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "Vanillaxi (via GitHub)" <gi...@apache.org> on 2026/06/30 15:55:28 UTC
[PR] Feature/fix triple nonblocking stream close [dubbo-go]
Vanillaxi opened a new pull request, #3465:
URL: https://github.com/apache/dubbo-go/pull/3465
## What
- Change `duplexHTTPCall.CloseRead()` to close the response body directly instead of draining the remaining response body first.
- Add regression tests for non-blocking close behavior across server-stream, bidi-stream, client-stream, and `duplexHTTPCall`.
## Why
`CloseRead()` previously drained the remaining response body before closing it. If the server kept the response stream open, returned an error early, stopped reading the request side, or the transport stopped producing response bytes, client close paths such as `ServerStreamForClient.Close`, `BidiStreamForClient.CloseResponse`, and `ClientStreamForClient.CloseAndReceive` could block unnecessarily.
This selectively ports only the stream close lifecycle behavior from the connect-go v1.18.0 fix without bringing in unrelated connect-go features.
Fixes #3457
## Tests
```bash
go test ./protocol/triple/triple_protocol -run 'TestServerStreamCloseDoesNotDrainResponse|TestBidiStreamCloseResponseDoesNotDrainResponse|TestBidiStreamCloseResponseAfterServerStopsReading|TestClientStreamCloseAndReceiveAfterServerReturnsError|TestDuplexHTTPCallCloseReadDoesNotDrainResponseBody' -count=1
go test ./protocol/triple/triple_protocol
go test ./protocol/triple
```
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Feature/fix triple nonblocking stream close [dubbo-go]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #3465:
URL: https://github.com/apache/dubbo-go/pull/3465#issuecomment-4845534048
## [Codecov](https://app.codecov.io/gh/apache/dubbo-go/pull/3465?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `71.70418%` with `88 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 53.90%. Comparing base ([`8b5bbcf`](https://app.codecov.io/gh/apache/dubbo-go/commit/8b5bbcf192aaac782e2fcf1ea2a6c7c90d9e3e1c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`9da32ff`](https://app.codecov.io/gh/apache/dubbo-go/commit/9da32fff28371b9479fa7eecd4a33802a4dff7f8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/dubbo-go/pull/3465?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...try/servicediscovery/service\_discovery\_registry.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3465?src=pr&el=tree&filepath=registry%2Fservicediscovery%2Fservice_discovery_registry.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cmVnaXN0cnkvc2VydmljZWRpc2NvdmVyeS9zZXJ2aWNlX2Rpc2NvdmVyeV9yZWdpc3RyeS5nbw==) | 64.15% | [27 Missing and 11 partials :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [metadata/info/metadata\_info.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3465?src=pr&el=tree&filepath=metadata%2Finfo%2Fmetadata_info.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bWV0YWRhdGEvaW5mby9tZXRhZGF0YV9pbmZvLmdv) | 70.58% | [15 Missing :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [metadata/report/zookeeper/report.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3465?src=pr&el=tree&filepath=metadata%2Freport%2Fzookeeper%2Freport.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bWV0YWRhdGEvcmVwb3J0L3pvb2tlZXBlci9yZXBvcnQuZ28=) | 62.85% | [12 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [metadata/report/nacos/report.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3465?src=pr&el=tree&filepath=metadata%2Freport%2Fnacos%2Freport.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bWV0YWRhdGEvcmVwb3J0L25hY29zL3JlcG9ydC5nbw==) | 80.85% | [7 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [metadata/report/etcd/report.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3465?src=pr&el=tree&filepath=metadata%2Freport%2Fetcd%2Freport.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bWV0YWRhdGEvcmVwb3J0L2V0Y2QvcmVwb3J0Lmdv) | 76.00% | [6 Missing :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [metadata/report/report.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3465?src=pr&el=tree&filepath=metadata%2Freport%2Freport.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bWV0YWRhdGEvcmVwb3J0L3JlcG9ydC5nbw==) | 0.00% | [5 Missing :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [metadata/report\_instance.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3465?src=pr&el=tree&filepath=metadata%2Freport_instance.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bWV0YWRhdGEvcmVwb3J0X2luc3RhbmNlLmdv) | 87.50% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #3465 +/- ##
==========================================
+ Coverage 53.57% 53.90% +0.33%
==========================================
Files 460 461 +1
Lines 35182 35476 +294
==========================================
+ Hits 18847 19124 +277
+ Misses 14857 14847 -10
- Partials 1478 1505 +27
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/dubbo-go/pull/3465?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Feature/fix triple nonblocking stream close [dubbo-go]
Posted by "Vanillaxi (via GitHub)" <gi...@apache.org>.
Vanillaxi closed pull request #3465: Feature/fix triple nonblocking stream close
URL: https://github.com/apache/dubbo-go/pull/3465
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Feature/fix triple nonblocking stream close [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3465:
URL: https://github.com/apache/dubbo-go/pull/3465#issuecomment-4845467737
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3465) **Quality Gate passed**
Issues
 [4 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3465&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3465&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3465&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3465&metric=new_coverage&view=list)
 [8.3% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3465&metric=new_duplicated_lines_density&view=list)
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3465)
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org