You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/03/18 11:21:59 UTC
[GitHub] [dubbo-go] xiejiajun opened a new pull request #1090: Fix: body buffer too short
xiejiajun opened a new pull request #1090:
URL: https://github.com/apache/dubbo-go/pull/1090
<!-- Thanks for sending a pull request!
Read https://github.com/apache/dubbo-go/blob/master/contributing.md before commit pull request.
-->
**What this PR does**:
* bug fix: getty RpcServerPackageHandler decode tcp pkg failed because of the body buffer is smaller than the size marked by header
**Which issue(s) this PR fixes**:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
-->
Fixes #1089
**Special notes for your reviewer**:
**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
```
----------------------------------------------------------------
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.
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
[GitHub] [dubbo-go] AlexStocks commented on pull request #1090: Fix: body buffer too short
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on pull request #1090:
URL: https://github.com/apache/dubbo-go/pull/1090#issuecomment-801872088
would u add an ut for ur pr?
----------------------------------------------------------------
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.
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
[GitHub] [dubbo-go] flycash commented on a change in pull request #1090: Fix: body buffer too short
Posted by GitBox <gi...@apache.org>.
flycash commented on a change in pull request #1090:
URL: https://github.com/apache/dubbo-go/pull/1090#discussion_r596855309
##########
File path: remoting/getty/readwriter.go
##########
@@ -114,7 +114,8 @@ func (p *RpcServerPackageHandler) Read(ss getty.Session, data []byte) (interface
req, length, err := (p.server.codec).Decode(data)
//resp,len, err := (*p.).DecodeResponse(buf)
if err != nil {
- if err == hessian.ErrHeaderNotEnough || err == hessian.ErrBodyNotEnough {
+ originErr := perrors.Cause(err)
+ if originErr == hessian.ErrHeaderNotEnough || originErr == hessian.ErrBodyNotEnough {
Review comment:
How about using `errors.Is()` ?
----------------------------------------------------------------
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.
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
[GitHub] [dubbo-go] codecov-io commented on pull request #1090: Fix: body buffer too short
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #1090:
URL: https://github.com/apache/dubbo-go/pull/1090#issuecomment-802511937
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=h1) Report
> Merging [#1090](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=desc) (f8417f2) into [1.5](https://codecov.io/gh/apache/dubbo-go/commit/968650f658b63c11bb0409897d29c57b91cfaf50?el=desc) (968650f) will **decrease** coverage by `0.46%`.
> The diff coverage is `60.26%`.
> :exclamation: Current head f8417f2 differs from pull request most recent head 51f6d0f. Consider uploading reports for the commit 51f6d0f to get more accurate results
[](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## 1.5 #1090 +/- ##
==========================================
- Coverage 59.53% 59.06% -0.47%
==========================================
Files 259 269 +10
Lines 12737 13122 +385
==========================================
+ Hits 7583 7751 +168
- Misses 4199 4407 +208
- Partials 955 964 +9
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [cluster/cluster\_impl/available\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXIuZ28=) | `100.00% <ø> (ø)` | |
| [cluster/cluster\_impl/zone\_aware\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvem9uZV9hd2FyZV9jbHVzdGVyX2ludm9rZXIuZ28=) | `64.28% <ø> (ø)` | |
| [cluster/router/healthcheck/factory.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y2x1c3Rlci9yb3V0ZXIvaGVhbHRoY2hlY2svZmFjdG9yeS5nbw==) | `66.66% <0.00%> (ø)` | |
| [cluster/router/tag/router\_rule.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y2x1c3Rlci9yb3V0ZXIvdGFnL3JvdXRlcl9ydWxlLmdv) | `89.47% <ø> (+12.20%)` | :arrow_up: |
| [common/extension/config\_post\_processor.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y29tbW9uL2V4dGVuc2lvbi9jb25maWdfcG9zdF9wcm9jZXNzb3IuZ28=) | `0.00% <0.00%> (ø)` | |
| [common/extension/conn\_checker.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y29tbW9uL2V4dGVuc2lvbi9jb25uX2NoZWNrZXIuZ28=) | `0.00% <0.00%> (ø)` | |
| [common/extension/metadata\_service.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y29tbW9uL2V4dGVuc2lvbi9tZXRhZGF0YV9zZXJ2aWNlLmdv) | `0.00% <0.00%> (ø)` | |
| [common/proxy/proxy\_factory/default.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y29tbW9uL3Byb3h5L3Byb3h5X2ZhY3RvcnkvZGVmYXVsdC5nbw==) | `13.55% <0.00%> (+0.22%)` | :arrow_up: |
| [config/base\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y29uZmlnL2Jhc2VfY29uZmlnLmdv) | `64.02% <ø> (ø)` | |
| [config/graceful\_shutdown.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y29uZmlnL2dyYWNlZnVsX3NodXRkb3duLmdv) | `54.28% <0.00%> (ø)` | |
| ... and [176 more](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=footer). Last update [274718b...51f6d0f](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
--
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.
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
[GitHub] [dubbo-go] codecov-io edited a comment on pull request #1090: Fix: body buffer too short
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1090:
URL: https://github.com/apache/dubbo-go/pull/1090#issuecomment-802511937
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=h1) Report
> Merging [#1090](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=desc) (51f6d0f) into [1.5](https://codecov.io/gh/apache/dubbo-go/commit/968650f658b63c11bb0409897d29c57b91cfaf50?el=desc) (968650f) will **decrease** coverage by `0.42%`.
> The diff coverage is `60.42%`.
> :exclamation: Current head 51f6d0f differs from pull request most recent head c6a448b. Consider uploading reports for the commit c6a448b to get more accurate results
[](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## 1.5 #1090 +/- ##
==========================================
- Coverage 59.53% 59.10% -0.43%
==========================================
Files 259 269 +10
Lines 12737 13122 +385
==========================================
+ Hits 7583 7756 +173
- Misses 4199 4396 +197
- Partials 955 970 +15
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [cluster/cluster\_impl/available\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXIuZ28=) | `100.00% <ø> (ø)` | |
| [cluster/cluster\_impl/zone\_aware\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvem9uZV9hd2FyZV9jbHVzdGVyX2ludm9rZXIuZ28=) | `64.28% <ø> (ø)` | |
| [cluster/router/healthcheck/factory.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y2x1c3Rlci9yb3V0ZXIvaGVhbHRoY2hlY2svZmFjdG9yeS5nbw==) | `66.66% <0.00%> (ø)` | |
| [cluster/router/tag/router\_rule.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y2x1c3Rlci9yb3V0ZXIvdGFnL3JvdXRlcl9ydWxlLmdv) | `89.47% <ø> (+12.20%)` | :arrow_up: |
| [common/config/environment.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y29tbW9uL2NvbmZpZy9lbnZpcm9ubWVudC5nbw==) | `67.56% <ø> (+15.84%)` | :arrow_up: |
| [common/extension/config\_post\_processor.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y29tbW9uL2V4dGVuc2lvbi9jb25maWdfcG9zdF9wcm9jZXNzb3IuZ28=) | `0.00% <0.00%> (ø)` | |
| [common/extension/conn\_checker.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y29tbW9uL2V4dGVuc2lvbi9jb25uX2NoZWNrZXIuZ28=) | `0.00% <0.00%> (ø)` | |
| [common/extension/metadata\_service.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y29tbW9uL2V4dGVuc2lvbi9tZXRhZGF0YV9zZXJ2aWNlLmdv) | `0.00% <0.00%> (ø)` | |
| [common/proxy/proxy\_factory/default.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y29tbW9uL3Byb3h5L3Byb3h5X2ZhY3RvcnkvZGVmYXVsdC5nbw==) | `13.55% <0.00%> (+0.22%)` | :arrow_up: |
| [config/base\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y29uZmlnL2Jhc2VfY29uZmlnLmdv) | `64.02% <ø> (ø)` | |
| ... and [183 more](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=footer). Last update [274718b...c6a448b](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
--
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.
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
[GitHub] [dubbo-go] AlexStocks merged pull request #1090: Fix: body buffer too short
Posted by GitBox <gi...@apache.org>.
AlexStocks merged pull request #1090:
URL: https://github.com/apache/dubbo-go/pull/1090
--
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.
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
[GitHub] [dubbo-go] xiejiajun commented on a change in pull request #1090: Fix: body buffer too short
Posted by GitBox <gi...@apache.org>.
xiejiajun commented on a change in pull request #1090:
URL: https://github.com/apache/dubbo-go/pull/1090#discussion_r597050428
##########
File path: remoting/getty/readwriter.go
##########
@@ -114,7 +114,8 @@ func (p *RpcServerPackageHandler) Read(ss getty.Session, data []byte) (interface
req, length, err := (p.server.codec).Decode(data)
//resp,len, err := (*p.).DecodeResponse(buf)
if err != nil {
- if err == hessian.ErrHeaderNotEnough || err == hessian.ErrBodyNotEnough {
+ originErr := perrors.Cause(err)
+ if originErr == hessian.ErrHeaderNotEnough || originErr == hessian.ErrBodyNotEnough {
Review comment:
Good idea.
--
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.
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
[GitHub] [dubbo-go] xiejiajun commented on a change in pull request #1090: Fix: body buffer too short
Posted by GitBox <gi...@apache.org>.
xiejiajun commented on a change in pull request #1090:
URL: https://github.com/apache/dubbo-go/pull/1090#discussion_r597369948
##########
File path: remoting/getty/readwriter.go
##########
@@ -114,7 +114,8 @@ func (p *RpcServerPackageHandler) Read(ss getty.Session, data []byte) (interface
req, length, err := (p.server.codec).Decode(data)
//resp,len, err := (*p.).DecodeResponse(buf)
if err != nil {
- if err == hessian.ErrHeaderNotEnough || err == hessian.ErrBodyNotEnough {
+ originErr := perrors.Cause(err)
+ if originErr == hessian.ErrHeaderNotEnough || originErr == hessian.ErrBodyNotEnough {
Review comment:
@flycash please review
--
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.
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
[GitHub] [dubbo-go] codecov-io edited a comment on pull request #1090: Fix: body buffer too short
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1090:
URL: https://github.com/apache/dubbo-go/pull/1090#issuecomment-802511937
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=h1) Report
> Merging [#1090](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=desc) (f8417f2) into [1.5](https://codecov.io/gh/apache/dubbo-go/commit/968650f658b63c11bb0409897d29c57b91cfaf50?el=desc) (968650f) will **decrease** coverage by `0.46%`.
> The diff coverage is `60.26%`.
> :exclamation: Current head f8417f2 differs from pull request most recent head c6a448b. Consider uploading reports for the commit c6a448b to get more accurate results
[](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## 1.5 #1090 +/- ##
==========================================
- Coverage 59.53% 59.06% -0.47%
==========================================
Files 259 269 +10
Lines 12737 13122 +385
==========================================
+ Hits 7583 7751 +168
- Misses 4199 4407 +208
- Partials 955 964 +9
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [cluster/cluster\_impl/available\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXIuZ28=) | `100.00% <ø> (ø)` | |
| [cluster/cluster\_impl/zone\_aware\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvem9uZV9hd2FyZV9jbHVzdGVyX2ludm9rZXIuZ28=) | `64.28% <ø> (ø)` | |
| [cluster/router/healthcheck/factory.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y2x1c3Rlci9yb3V0ZXIvaGVhbHRoY2hlY2svZmFjdG9yeS5nbw==) | `66.66% <0.00%> (ø)` | |
| [cluster/router/tag/router\_rule.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y2x1c3Rlci9yb3V0ZXIvdGFnL3JvdXRlcl9ydWxlLmdv) | `89.47% <ø> (+12.20%)` | :arrow_up: |
| [common/extension/config\_post\_processor.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y29tbW9uL2V4dGVuc2lvbi9jb25maWdfcG9zdF9wcm9jZXNzb3IuZ28=) | `0.00% <0.00%> (ø)` | |
| [common/extension/conn\_checker.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y29tbW9uL2V4dGVuc2lvbi9jb25uX2NoZWNrZXIuZ28=) | `0.00% <0.00%> (ø)` | |
| [common/extension/metadata\_service.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y29tbW9uL2V4dGVuc2lvbi9tZXRhZGF0YV9zZXJ2aWNlLmdv) | `0.00% <0.00%> (ø)` | |
| [common/proxy/proxy\_factory/default.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y29tbW9uL3Byb3h5L3Byb3h5X2ZhY3RvcnkvZGVmYXVsdC5nbw==) | `13.55% <0.00%> (+0.22%)` | :arrow_up: |
| [config/base\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y29uZmlnL2Jhc2VfY29uZmlnLmdv) | `64.02% <ø> (ø)` | |
| [config/graceful\_shutdown.go](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree#diff-Y29uZmlnL2dyYWNlZnVsX3NodXRkb3duLmdv) | `54.28% <0.00%> (ø)` | |
| ... and [176 more](https://codecov.io/gh/apache/dubbo-go/pull/1090/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=footer). Last update [274718b...c6a448b](https://codecov.io/gh/apache/dubbo-go/pull/1090?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
--
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.
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