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/06/29 02:04:25 UTC
[GitHub] [dubbo] icodening opened a new pull request, #10231: fix memory leak
icodening opened a new pull request, #10231:
URL: https://github.com/apache/dubbo/pull/10231
## What is the purpose of the change
fix #10219
## Brief changelog
Release ``UnsafeByteArrayInputStream``/``UnsafeByteArrayOutputStream`` mData/mBuffer when close
## Checklist
- [x] Make sure there is a [GitHub_issue](https://github.com/apache/dubbo/issues) field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
- [ ] Each commit in the pull request should have a meaningful subject line and body.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
- [ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in [dubbo samples](https://github.com/apache/dubbo-samples) project.
- [ ] Add some description to [dubbo-website](https://github.com/apache/dubbo-website) project if you are requesting to add a feature.
- [ ] GitHub Actions works fine on your own branch.
- [ ] If this contribution is large, please follow the [Software Donation Guide](https://github.com/apache/dubbo/wiki/Software-donation-guide).
--
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] flacocobot commented on a diff in pull request #10231: fix memory leak
Posted by GitBox <gi...@apache.org>.
flacocobot commented on code in PR #10231:
URL: https://github.com/apache/dubbo/pull/10231#discussion_r909146339
##########
dubbo-common/src/main/java/org/apache/dubbo/common/io/UnsafeByteArrayOutputStream.java:
##########
@@ -97,5 +97,7 @@
@Override
public void close() throws IOException {
+ this.mBuffer = new byte[0];
+ this.mCount = 0;
}
Review Comment:
This line (102) has been identified with a suspiciousness value of 70.71%.
<details>
<summary>Failing tests that cover this line</summary>
- `org.apache.dubbo.common.io.BytesTest#testZip`
</details>
##########
dubbo-common/src/main/java/org/apache/dubbo/common/io/UnsafeByteArrayInputStream.java:
##########
@@ -102,6 +102,10 @@
@Override
public void close() throws IOException {
+ this.mData = new byte[0];
+ this.mPosition = 0;
Review Comment:
This line (106) has been identified with a suspiciousness value of 70.71%.
<details>
<summary>Failing tests that cover this line</summary>
- `org.apache.dubbo.common.io.BytesTest#testZip`
</details>
##########
dubbo-common/src/main/java/org/apache/dubbo/common/io/UnsafeByteArrayOutputStream.java:
##########
@@ -97,5 +97,7 @@
@Override
public void close() throws IOException {
+ this.mBuffer = new byte[0];
+ this.mCount = 0;
Review Comment:
This line (101) has been identified with a suspiciousness value of 70.71%.
<details>
<summary>Failing tests that cover this line</summary>
- `org.apache.dubbo.common.io.BytesTest#testZip`
</details>
##########
dubbo-common/src/main/java/org/apache/dubbo/common/io/UnsafeByteArrayInputStream.java:
##########
@@ -102,6 +102,10 @@ public void reset() {
@Override
public void close() throws IOException {
+ this.mData = new byte[0];
Review Comment:
This line (105) has been identified with a suspiciousness value of 70.71%.
<details>
<summary>Failing tests that cover this line</summary>
- `org.apache.dubbo.common.io.BytesTest#testZip`
</details>
##########
dubbo-common/src/main/java/org/apache/dubbo/common/io/UnsafeByteArrayOutputStream.java:
##########
@@ -97,5 +97,7 @@ public String toString(String charset) throws UnsupportedEncodingException {
@Override
public void close() throws IOException {
+ this.mBuffer = new byte[0];
Review Comment:
This line (100) has been identified with a suspiciousness value of 70.71%.
<details>
<summary>Failing tests that cover this line</summary>
- `org.apache.dubbo.common.io.BytesTest#testZip`
</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
[GitHub] [dubbo] codecov-commenter commented on pull request #10231: [2.7] fix memory leak
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #10231:
URL: https://github.com/apache/dubbo/pull/10231#issuecomment-1169534931
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/10231?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 [#10231](https://codecov.io/gh/apache/dubbo/pull/10231?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8d5a4cf) into [master](https://codecov.io/gh/apache/dubbo/commit/c1a76a06a8e60b4dd97041611ca3521ca6fc322a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c1a76a0) will **decrease** coverage by `0.37%`.
> The diff coverage is `100.00%`.
```diff
@@ Coverage Diff @@
## master #10231 +/- ##
============================================
- Coverage 60.95% 60.58% -0.38%
+ Complexity 448 446 -2
============================================
Files 1100 1100
Lines 44579 44464 -115
Branches 6493 6454 -39
============================================
- Hits 27175 26937 -238
- Misses 14437 14566 +129
+ Partials 2967 2961 -6
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/10231?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...common/serialize/hessian2/Hessian2ObjectInput.java](https://codecov.io/gh/apache/dubbo/pull/10231/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-ZHViYm8tc2VyaWFsaXphdGlvbi9kdWJiby1zZXJpYWxpemF0aW9uLWhlc3NpYW4yL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vc2VyaWFsaXplL2hlc3NpYW4yL0hlc3NpYW4yT2JqZWN0SW5wdXQuamF2YQ==) | `90.47% <100.00%> (-1.53%)` | :arrow_down: |
| [...ommon/serialize/hessian2/Hessian2ObjectOutput.java](https://codecov.io/gh/apache/dubbo/pull/10231/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-ZHViYm8tc2VyaWFsaXphdGlvbi9kdWJiby1zZXJpYWxpemF0aW9uLWhlc3NpYW4yL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vc2VyaWFsaXplL2hlc3NpYW4yL0hlc3NpYW4yT2JqZWN0T3V0cHV0LmphdmE=) | `93.93% <100.00%> (-0.66%)` | :arrow_down: |
| [...a/org/apache/dubbo/rpc/filter/AccessLogFilter.java](https://codecov.io/gh/apache/dubbo/pull/10231/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-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9maWx0ZXIvQWNjZXNzTG9nRmlsdGVyLmphdmE=) | `27.69% <0.00%> (-50.77%)` | :arrow_down: |
| [...va/org/apache/dubbo/rpc/support/AccessLogData.java](https://codecov.io/gh/apache/dubbo/pull/10231/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-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9zdXBwb3J0L0FjY2Vzc0xvZ0RhdGEuamF2YQ==) | `53.16% <0.00%> (-37.98%)` | :arrow_down: |
| [...ng/transport/dispatcher/all/AllChannelHandler.java](https://codecov.io/gh/apache/dubbo/pull/10231/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-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvZGlzcGF0Y2hlci9hbGwvQWxsQ2hhbm5lbEhhbmRsZXIuamF2YQ==) | `62.06% <0.00%> (-34.49%)` | :arrow_down: |
| [...ng/transport/dispatcher/WrappedChannelHandler.java](https://codecov.io/gh/apache/dubbo/pull/10231/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-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvZGlzcGF0Y2hlci9XcmFwcGVkQ2hhbm5lbEhhbmRsZXIuamF2YQ==) | `47.82% <0.00%> (-15.22%)` | :arrow_down: |
| [...org/apache/dubbo/registry/dubbo/DubboRegistry.java](https://codecov.io/gh/apache/dubbo/pull/10231/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-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktZGVmYXVsdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcmVnaXN0cnkvZHViYm8vRHViYm9SZWdpc3RyeS5qYXZh) | `42.00% <0.00%> (-14.00%)` | :arrow_down: |
| [...g/apache/dubbo/remoting/p2p/support/FileGroup.java](https://codecov.io/gh/apache/dubbo/pull/10231/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-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctcDJwL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy9wMnAvc3VwcG9ydC9GaWxlR3JvdXAuamF2YQ==) | `50.94% <0.00%> (-13.21%)` | :arrow_down: |
| [...bo/config/event/listener/LoggingEventListener.java](https://codecov.io/gh/apache/dubbo/pull/10231/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-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9ldmVudC9saXN0ZW5lci9Mb2dnaW5nRXZlbnRMaXN0ZW5lci5qYXZh) | `50.00% <0.00%> (-12.50%)` | :arrow_down: |
| [...dubbo/common/status/support/LoadStatusChecker.java](https://codecov.io/gh/apache/dubbo/pull/10231/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-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vc3RhdHVzL3N1cHBvcnQvTG9hZFN0YXR1c0NoZWNrZXIuamF2YQ==) | `50.00% <0.00%> (-11.54%)` | :arrow_down: |
| ... and [48 more](https://codecov.io/gh/apache/dubbo/pull/10231/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/10231?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/pull/10231?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 [c1a76a0...8d5a4cf](https://codecov.io/gh/apache/dubbo/pull/10231?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] icodening commented on pull request #10231: [2.7] fix memory leak
Posted by GitBox <gi...@apache.org>.
icodening commented on PR #10231:
URL: https://github.com/apache/dubbo/pull/10231#issuecomment-1169523797
@AlbumenJ the pr had remove ``ThreadLocal`` to fix issue #10219, pls 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.
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] AlbumenJ merged pull request #10231: [2.7] fix memory leak
Posted by GitBox <gi...@apache.org>.
AlbumenJ merged PR #10231:
URL: https://github.com/apache/dubbo/pull/10231
--
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] icodening closed pull request #10231: fix memory leak
Posted by GitBox <gi...@apache.org>.
icodening closed pull request #10231: fix memory leak
URL: https://github.com/apache/dubbo/pull/10231
--
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