You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "zekai-li (via GitHub)" <gi...@apache.org> on 2024/06/12 06:54:52 UTC
[PR] [ISSUE #8289] Fixed network bugs and merged networkutil code [rocketmq]
zekai-li opened a new pull request, #8290:
URL: https://github.com/apache/rocketmq/pull/8290
Fix the following three as
1,TraceBean: private static final String LOCAL_ADDRESS = UtilAll.ipToIPv4Str(UtilAll.getIP()); getIP mayby ipv6
2,NetworkUtil:if (ip.startsWith("127.0") || ip.startsWith("192.168") || ip.startsWith("0."));Check whether Intranet errors exist
<!-- Please make sure the target branch is right. In most case, the target branch should be `develop`. -->
### Which Issue(s) This PR Fixes
<!-- Please ensure that the related issue has already been created, and [link this pull request to that issue using keywords](<https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword>) to ensure automatic closure. -->
Fixes #8289
### Brief Description
<!-- Write a brief description for your pull request to help the maintainer understand the reasons behind your changes. -->
### How Did You Test This Change?
<!-- In order to ensure the code quality of Apache RocketMQ, we expect every pull request to have undergone thorough testing. -->
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #8289] Fixed network bugs and merged networkutil code [rocketmq]
Posted by "drpmma (via GitHub)" <gi...@apache.org>.
drpmma commented on code in PR #8290:
URL: https://github.com/apache/rocketmq/pull/8290#discussion_r1637430866
##########
client/src/main/java/org/apache/rocketmq/client/trace/TraceBean.java:
##########
@@ -37,6 +37,15 @@ public class TraceBean {
private String transactionId;
private boolean fromTransactionCheck;
+ static {
+ byte[] ip = UtilAll.getIP();
+ if (UtilAll.isInternalIP(ip)) {
+ LOCAL_ADDRESS = UtilAll.ipToIPv4Str(ip);
+ } else {
+ LOCAL_ADDRESS = UtilAll.ipToIPv6Str(ip);
Review Comment:
Not being an internal IP does not necessarily mean it's an IPv6 IP.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #8289] Fixed network bugs and merged networkutil code [rocketmq]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #8290:
URL: https://github.com/apache/rocketmq/pull/8290#issuecomment-2162388944
## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/8290?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: Patch coverage is `58.73016%` with `26 lines` in your changes missing coverage. Please review.
> Project coverage is 42.86%. Comparing base [(`1a73e01`)](https://app.codecov.io/gh/apache/rocketmq/commit/1a73e015b8c764a39d2a03a5a58bf26a78638986?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`83b3beb`)](https://app.codecov.io/gh/apache/rocketmq/commit/83b3bebfac92a372fab18ad2c0c243096ea02be7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
| [Files](https://app.codecov.io/gh/apache/rocketmq/pull/8290?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [.../org/apache/rocketmq/common/utils/NetworkUtil.java](https://app.codecov.io/gh/apache/rocketmq/pull/8290?src=pr&el=tree&filepath=common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fcommon%2Futils%2FNetworkUtil.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vdXRpbHMvTmV0d29ya1V0aWwuamF2YQ==) | 58.69% | [12 Missing and 7 partials :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/8290?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [.../main/java/org/apache/rocketmq/common/UtilAll.java](https://app.codecov.io/gh/apache/rocketmq/pull/8290?src=pr&el=tree&filepath=common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fcommon%2FUtilAll.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vVXRpbEFsbC5qYXZh) | 58.33% | [1 Missing and 4 partials :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/8290?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...va/org/apache/rocketmq/client/trace/TraceBean.java](https://app.codecov.io/gh/apache/rocketmq/pull/8290?src=pr&el=tree&filepath=client%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fclient%2Ftrace%2FTraceBean.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvdHJhY2UvVHJhY2VCZWFuLmphdmE=) | 60.00% | [1 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/8290?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 @@
## develop #8290 +/- ##
=============================================
- Coverage 42.90% 42.86% -0.05%
+ Complexity 10408 10399 -9
=============================================
Files 1274 1274
Lines 88952 88966 +14
Branches 11438 11443 +5
=============================================
- Hits 38168 38138 -30
- Misses 46076 46106 +30
- Partials 4708 4722 +14
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/rocketmq/pull/8290?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).
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #8289] Fixed network bugs and merged networkutil code [rocketmq]
Posted by "francisoliverlee (via GitHub)" <gi...@apache.org>.
francisoliverlee merged PR #8290:
URL: https://github.com/apache/rocketmq/pull/8290
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #8289] Fixed network bugs and merged networkutil code [rocketmq]
Posted by "zekai-li (via GitHub)" <gi...@apache.org>.
zekai-li commented on code in PR #8290:
URL: https://github.com/apache/rocketmq/pull/8290#discussion_r1637473540
##########
client/src/main/java/org/apache/rocketmq/client/trace/TraceBean.java:
##########
@@ -37,6 +37,15 @@ public class TraceBean {
private String transactionId;
private boolean fromTransactionCheck;
+ static {
+ byte[] ip = UtilAll.getIP();
+ if (UtilAll.isInternalIP(ip)) {
+ LOCAL_ADDRESS = UtilAll.ipToIPv4Str(ip);
+ } else {
+ LOCAL_ADDRESS = UtilAll.ipToIPv6Str(ip);
Review Comment:
Thanks, it has been modified
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org