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 2022/04/20 06:00:28 UTC

[GitHub] [dubbo-go] sheny1xuan opened a new pull request, #1848: fix: limit rpc package data size by user's config rather than DEFAULT_LEN.

sheny1xuan opened a new pull request, #1848:
URL: https://github.com/apache/dubbo-go/pull/1848

   
   <!--  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**: 
   
     * Dubbo recommand package data length not greater than 8MiB.
     * If package data length greater than 8MiB, generate warnning.
     * If package data lenght greater than user's config, generate exception.
   
   Signed-off-by: stonex <14...@qq.com>
   **Which issue(s) this PR fixes**: 
   Fixes #1839 
   
   **You should pay attention to items below to ensure your pr passes our ci test**
   We do not merge pr with ci tests failed
   
   - [ ] All ut passed (run 'go test ./...' in project root)
   - [ ] After go-fmt ed , run 'go fmt project' using goland.
   - [ ] Golangci-lint passed, run 'sudo golangci-lint run' in project root.
   - [ ] After import formatted, (using [imports-formatter](https://github.com/dubbogo/tools#5-how-to-get-imports-formatter) to run 'imports-formatter .' in project root, to format your import blocks, mentioned in [CONTRIBUTING.md](https://github.com/apache/dubbo-go/blob/master/CONTRIBUTING.md) above) 
   - [ ] Your new-created file needs to have [apache license](https://raw.githubusercontent.com/dubbogo/resources/master/tools/license/license.txt) at the top, like other existed file does.
   - [ ] All integration test passed. You can run integration test locally (with docker env). Clone our [dubbo-go-samples](https://github.com/apache/dubbo-go-samples) project and replace the go.mod to your dubbo-go, and run 'sudo sh start_integration_test.sh' at root of samples project root. (M1 Slice is not Support)


-- 
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


[GitHub] [dubbo-go] AlexStocks commented on pull request #1848: fix: limit rpc package data size by user's config rather than DEFAULT_LEN.

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on PR #1848:
URL: https://github.com/apache/dubbo-go/pull/1848#issuecomment-1103823365

   在日志中,提示下,如果通信的对端是 dubbo java,则dubbo java 无法处理超过 DEFAULT_LEN(8MiB) 的包。


-- 
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


[GitHub] [dubbo-go] AlexStocks merged pull request #1848: fix: limit rpc package data size by user's config rather than DEFAULT_LEN.

Posted by GitBox <gi...@apache.org>.
AlexStocks merged PR #1848:
URL: https://github.com/apache/dubbo-go/pull/1848


-- 
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


[GitHub] [dubbo-go] sheny1xuan commented on a diff in pull request #1848: fix: limit rpc package data size by user's config rather than DEFAULT_LEN.

Posted by GitBox <gi...@apache.org>.
sheny1xuan commented on code in PR #1848:
URL: https://github.com/apache/dubbo-go/pull/1848#discussion_r854715640


##########
protocol/dubbo/hessian2/hessian_request.go:
##########
@@ -172,8 +172,9 @@ func packRequest(service Service, header DubboHeader, req interface{}) ([]byte,
 END:
 	byteArray = encoder.Buffer()
 	pkgLen = len(byteArray)
-	if pkgLen > int(DEFAULT_LEN) { // 8M
-		return nil, perrors.Errorf("Data length %d too large, max payload %d", pkgLen, DEFAULT_LEN)
+	if pkgLen > int(DEFAULT_LEN) { // recommand 8M
+		logger.Warnf("Data length %d too large, recommand max payload %d. "+
+			"Dubbo java can't handle the package which size greater than %d!!!", pkgLen, DEFAULT_LEN, DEFAULT_LEN)

Review Comment:
   done.



-- 
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


[GitHub] [dubbo-go] codecov-commenter commented on pull request #1848: fix: limit rpc package data size by user's config rather than DEFAULT_LEN.

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #1848:
URL: https://github.com/apache/dubbo-go/pull/1848#issuecomment-1103651668

   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1848?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1848](https://codecov.io/gh/apache/dubbo-go/pull/1848?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7554539) into [3.0](https://codecov.io/gh/apache/dubbo-go/commit/605764ef9cb258abfdc80d33825e4a72f33121b1?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (605764e) will **decrease** coverage by `0.04%`.
   > The diff coverage is `15.38%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##              3.0    #1848      +/-   ##
   ==========================================
   - Coverage   46.76%   46.72%   -0.05%     
   ==========================================
     Files         298      298              
     Lines       17178    17196      +18     
   ==========================================
   + Hits         8034     8035       +1     
   - Misses       8291     8306      +15     
   - Partials      853      855       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/1848?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [protocol/dubbo/hessian2/hessian\_request.go](https://codecov.io/gh/apache/dubbo-go/pull/1848/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHJvdG9jb2wvZHViYm8vaGVzc2lhbjIvaGVzc2lhbl9yZXF1ZXN0Lmdv) | `65.71% <0.00%> (ø)` | |
   | [protocol/dubbo/hessian2/hessian\_response.go](https://codecov.io/gh/apache/dubbo-go/pull/1848/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHJvdG9jb2wvZHViYm8vaGVzc2lhbjIvaGVzc2lhbl9yZXNwb25zZS5nbw==) | `53.45% <0.00%> (ø)` | |
   | [protocol/dubbo/impl/codec.go](https://codecov.io/gh/apache/dubbo-go/pull/1848/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHJvdG9jb2wvZHViYm8vaW1wbC9jb2RlYy5nbw==) | `41.66% <0.00%> (ø)` | |
   | [remoting/getty/readwriter.go](https://codecov.io/gh/apache/dubbo-go/pull/1848/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cmVtb3RpbmcvZ2V0dHkvcmVhZHdyaXRlci5nbw==) | `35.13% <22.22%> (-4.16%)` | :arrow_down: |
   | [metrics/prometheus/reporter.go](https://codecov.io/gh/apache/dubbo-go/pull/1848/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bWV0cmljcy9wcm9tZXRoZXVzL3JlcG9ydGVyLmdv) | `26.85% <0.00%> (-1.72%)` | :arrow_down: |
   | [remoting/xds/client.go](https://codecov.io/gh/apache/dubbo-go/pull/1848/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cmVtb3RpbmcveGRzL2NsaWVudC5nbw==) | `56.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1848?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1848?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [605764e...7554539](https://codecov.io/gh/apache/dubbo-go/pull/1848?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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


[GitHub] [dubbo-go] AlexStocks commented on a diff in pull request #1848: fix: limit rpc package data size by user's config rather than DEFAULT_LEN.

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on code in PR #1848:
URL: https://github.com/apache/dubbo-go/pull/1848#discussion_r854274760


##########
protocol/dubbo/hessian2/hessian_request.go:
##########
@@ -172,8 +172,9 @@ func packRequest(service Service, header DubboHeader, req interface{}) ([]byte,
 END:
 	byteArray = encoder.Buffer()
 	pkgLen = len(byteArray)
-	if pkgLen > int(DEFAULT_LEN) { // 8M
-		return nil, perrors.Errorf("Data length %d too large, max payload %d", pkgLen, DEFAULT_LEN)
+	if pkgLen > int(DEFAULT_LEN) { // recommand 8M
+		logger.Warnf("Data length %d too large, recommand max payload %d. "+
+			"Dubbo java can't handle the package which size greater than %d!!!", pkgLen, DEFAULT_LEN, DEFAULT_LEN)

Review Comment:
    which size greater than =  whose size is greater than



-- 
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