You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "miles-ton (via GitHub)" <gi...@apache.org> on 2023/03/16 06:31:08 UTC
[GitHub] [rocketmq] miles-ton opened a new pull request, #6364: [ISSUE #6357]shouldn't use computePullFromWhere()
miles-ton opened a new pull request, #6364:
URL: https://github.com/apache/rocketmq/pull/6364
**Make sure set the target branch to `develop`**
## What is the purpose of the change
<!--
If this PR fixes a GitHub issue, please add `fixes #<XXX>` or `closes #<XXX>`. Please refer to the documentation for more information:
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
-->
fix #6357 <!-- <xxx> replace with issue id -->
## Brief changelog
XX
## Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily. Notice, `it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR`.
- [x] Make sure there is a [Github issue](https://github.com/apache/rocketmq/issues) filed 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.
- [x] Format the pull request title like `[ISSUE #123] Fix UnknownException when host config not exist`. Each commit in the pull request should have a meaningful subject line and body.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit-test(over 80% coverage) 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 integration-test in [test module](https://github.com/apache/rocketmq/tree/master/test).
- [x] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install -DskipITs` to make sure unit-test pass. Run `mvn clean test-compile failsafe:integration-test` to make sure integration-test pass.
- [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas).
--
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
[GitHub] [rocketmq] codecov-commenter commented on pull request #6364: [ISSUE #6357]shouldn't use computePullFromWhere()
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #6364:
URL: https://github.com/apache/rocketmq/pull/6364#issuecomment-1475483076
## [Codecov](https://codecov.io/gh/apache/rocketmq/pull/6364?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 [#6364](https://codecov.io/gh/apache/rocketmq/pull/6364?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d1474c0) into [develop](https://codecov.io/gh/apache/rocketmq/commit/2cc899fc35ae867477c5e992bfaa435433512745?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2cc899f) will **decrease** coverage by `0.04%`.
> The diff coverage is `28.57%`.
```diff
@@ Coverage Diff @@
## develop #6364 +/- ##
=============================================
- Coverage 43.08% 43.05% -0.04%
- Complexity 8862 8909 +47
=============================================
Files 1094 1105 +11
Lines 77325 77925 +600
Branches 10094 10139 +45
=============================================
+ Hits 33319 33551 +232
- Misses 39840 40162 +322
- Partials 4166 4212 +46
```
| [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/6364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...he/rocketmq/proxy/config/ConfigurationManager.java](https://codecov.io/gh/apache/rocketmq/pull/6364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHJveHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Byb3h5L2NvbmZpZy9Db25maWd1cmF0aW9uTWFuYWdlci5qYXZh) | `69.23% <0.00%> (-12.59%)` | :arrow_down: |
| [...e/rocketmq/client/impl/consumer/RebalanceImpl.java](https://codecov.io/gh/apache/rocketmq/pull/6364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9SZWJhbGFuY2VJbXBsLmphdmE=) | `31.30% <40.00%> (+1.00%)` | :arrow_up: |
... and [98 files with indirect coverage changes](https://codecov.io/gh/apache/rocketmq/pull/6364/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] github-code-scanning[bot] commented on pull request #6364: [ISSUE #6357]shouldn't use computePullFromWhere()
Posted by "github-code-scanning[bot] (via GitHub)" <gi...@apache.org>.
github-code-scanning[bot] commented on PR #6364:
URL: https://github.com/apache/rocketmq/pull/6364#issuecomment-1475473467
You have successfully added a new CodeQL configuration `.github/workflows/codeql_analysis.yml:CodeQL-Build`. As part of the setup process, we have scanned this repository and found 9 existing alerts. Please check the repository [Security tab](/apache/rocketmq/security/code-scanning?query=pr%3A6364+tool%3ACodeQL+is%3Aopen) to see all alerts.
--
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 #6357]shouldn't use computePullFromWhere() [rocketmq]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6364:
URL: https://github.com/apache/rocketmq/pull/6364#issuecomment-2026352052
This PR was closed because it has been inactive for 3 days since being marked as stale.
--
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
[GitHub] [rocketmq] GenerousMan commented on a diff in pull request #6364: [ISSUE #6357]shouldn't use computePullFromWhere()
Posted by "GenerousMan (via GitHub)" <gi...@apache.org>.
GenerousMan commented on code in PR #6364:
URL: https://github.com/apache/rocketmq/pull/6364#discussion_r1145698259
##########
client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:
##########
@@ -521,7 +521,13 @@ private boolean updateProcessQueueTableInRebalance(final String topic, final Set
this.removeDirtyOffset(mq);
ProcessQueue pq = createProcessQueue(topic);
pq.setLocked(true);
- long nextOffset = this.computePullFromWhere(mq);
+ long nextOffset;
+ try {
+ nextOffset = this.computePullFromWhereWithException(mq);
+ } catch (MQClientException e) {
+ log.info("doRebalance, {}, compute offset failed, {}", consumerGroup, mq);
Review Comment:
maybe log.info() can be replaced with log.warn()?
Does it need to be consistent with the following codes?
` log.warn("doRebalance, {}, add new mq failed, {}", consumerGroup, mq);`
--
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 #6357]shouldn't use computePullFromWhere() [rocketmq]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #6364: [ISSUE #6357]shouldn't use computePullFromWhere()
URL: https://github.com/apache/rocketmq/pull/6364
--
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
[GitHub] [rocketmq] miles-ton commented on a diff in pull request #6364: [ISSUE #6357]shouldn't use computePullFromWhere()
Posted by "miles-ton (via GitHub)" <gi...@apache.org>.
miles-ton commented on code in PR #6364:
URL: https://github.com/apache/rocketmq/pull/6364#discussion_r1146406414
##########
client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:
##########
@@ -521,7 +521,13 @@ private boolean updateProcessQueueTableInRebalance(final String topic, final Set
this.removeDirtyOffset(mq);
ProcessQueue pq = createProcessQueue(topic);
pq.setLocked(true);
- long nextOffset = this.computePullFromWhere(mq);
+ long nextOffset;
+ try {
+ nextOffset = this.computePullFromWhereWithException(mq);
+ } catch (MQClientException e) {
+ log.info("doRebalance, {}, compute offset failed, {}", consumerGroup, mq);
Review Comment:
thanks for your comment. sure, it should be log.warn(), i will change it later
--
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 #6357]shouldn't use computePullFromWhere() [rocketmq]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6364:
URL: https://github.com/apache/rocketmq/pull/6364#issuecomment-2017002457
This PR is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this 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.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org