You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2020/10/12 01:26:16 UTC

[GitHub] [rocketmq] spiritsx opened a new pull request #2346: [ISSUE #2338] use commitLeastPages parameters and substitute 'lastCom…

spiritsx opened a new pull request #2346:
URL: https://github.com/apache/rocketmq/pull/2346


   …mittedPosition' for duplicated 'this.committedPosition.get()' in 'commit0' method (#2338)
   
   ## What is the purpose of the change
   
   issue # 2338
   
   ## Brief changelog
   
   1.use commitLeastPages parameters in 'commit0' method
   2.substitute 'lastCommittedPosition' for duplicated 'this.committedPosition.get()' in 'commit0' method
   
   ## 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] codecov-io commented on pull request #2346: [ISSUE #2338] use commitLeastPages parameters and substitute 'lastCom…

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #2346:
URL: https://github.com/apache/rocketmq/pull/2346#issuecomment-706812624


   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/2346?src=pr&el=h1) Report
   > Merging [#2346](https://codecov.io/gh/apache/rocketmq/pull/2346?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/rocketmq/commit/77d24def3a5aafd0d10afd525734bba398cf48b2?el=desc) will **decrease** coverage by `0.07%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/rocketmq/pull/2346/graphs/tree.svg?width=650&height=150&src=pr&token=4w0sxP1wZv)](https://codecov.io/gh/apache/rocketmq/pull/2346?src=pr&el=tree)
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #2346      +/-   ##
   =============================================
   - Coverage      45.69%   45.61%   -0.08%     
   + Complexity      4289     4281       -8     
   =============================================
     Files            547      547              
     Lines          35971    35971              
     Branches        4770     4770              
   =============================================
   - Hits           16437    16409      -28     
   - Misses         17477    17502      +25     
   - Partials        2057     2060       +3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/2346?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...ain/java/org/apache/rocketmq/store/MappedFile.java](https://codecov.io/gh/apache/rocketmq/pull/2346/diff?src=pr&el=tree#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL01hcHBlZEZpbGUuamF2YQ==) | `50.18% <0.00%> (ø)` | `50.00 <0.00> (ø)` | |
   | [...tmq/logappender/log4j2/RocketmqLog4j2Appender.java](https://codecov.io/gh/apache/rocketmq/pull/2346/diff?src=pr&el=tree#diff-bG9nYXBwZW5kZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL2xvZ2FwcGVuZGVyL2xvZzRqMi9Sb2NrZXRtcUxvZzRqMkFwcGVuZGVyLmphdmE=) | `35.00% <0.00%> (-10.00%)` | `3.00% <0.00%> (-1.00%)` | |
   | [...org/apache/rocketmq/common/stats/StatsItemSet.java](https://codecov.io/gh/apache/rocketmq/pull/2346/diff?src=pr&el=tree#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvU3RhdHNJdGVtU2V0LmphdmE=) | `41.79% <0.00%> (-8.96%)` | `16.00% <0.00%> (-3.00%)` | |
   | [...in/java/org/apache/rocketmq/test/util/MQAdmin.java](https://codecov.io/gh/apache/rocketmq/pull/2346/diff?src=pr&el=tree#diff-dGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvdGVzdC91dGlsL01RQWRtaW4uamF2YQ==) | `38.88% <0.00%> (-5.56%)` | `7.00% <0.00%> (-1.00%)` | |
   | [...apache/rocketmq/remoting/netty/ResponseFuture.java](https://codecov.io/gh/apache/rocketmq/pull/2346/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3JlbW90aW5nL25ldHR5L1Jlc3BvbnNlRnV0dXJlLmphdmE=) | `85.00% <0.00%> (-5.00%)` | `16.00% <0.00%> (-2.00%)` | |
   | [...ketmq/common/protocol/body/ConsumerConnection.java](https://codecov.io/gh/apache/rocketmq/pull/2346/diff?src=pr&el=tree#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vcHJvdG9jb2wvYm9keS9Db25zdW1lckNvbm5lY3Rpb24uamF2YQ==) | `95.83% <0.00%> (-4.17%)` | `13.00% <0.00%> (-1.00%)` | |
   | [...rocketmq/remoting/netty/NettyRemotingAbstract.java](https://codecov.io/gh/apache/rocketmq/pull/2346/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3JlbW90aW5nL25ldHR5L05ldHR5UmVtb3RpbmdBYnN0cmFjdC5qYXZh) | `46.86% <0.00%> (-4.06%)` | `20.00% <0.00%> (-2.00%)` | |
   | [.../rocketmq/client/impl/consumer/PullAPIWrapper.java](https://codecov.io/gh/apache/rocketmq/pull/2346/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9QdWxsQVBJV3JhcHBlci5qYXZh) | `50.42% <0.00%> (-0.86%)` | `12.00% <0.00%> (-1.00%)` | |
   | [...n/java/org/apache/rocketmq/store/ha/HAService.java](https://codecov.io/gh/apache/rocketmq/pull/2346/diff?src=pr&el=tree#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL2hhL0hBU2VydmljZS5qYXZh) | `67.88% <0.00%> (-0.67%)` | `18.00% <0.00%> (ø%)` | |
   | [...ava/org/apache/rocketmq/filter/util/BitsArray.java](https://codecov.io/gh/apache/rocketmq/pull/2346/diff?src=pr&el=tree#diff-ZmlsdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9maWx0ZXIvdXRpbC9CaXRzQXJyYXkuamF2YQ==) | `59.82% <0.00%> (ø)` | `30.00% <0.00%> (ø%)` | |
   | ... and [9 more](https://codecov.io/gh/apache/rocketmq/pull/2346/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/rocketmq/pull/2346?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/rocketmq/pull/2346?src=pr&el=footer). Last update [77d24de...1626356](https://codecov.io/gh/apache/rocketmq/pull/2346?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



[GitHub] [rocketmq] kexianjun commented on pull request #2346: [ISSUE #2338] Using commitLeastPages parameters and substituting 'lastCom…

Posted by GitBox <gi...@apache.org>.
kexianjun commented on pull request #2346:
URL: https://github.com/apache/rocketmq/pull/2346#issuecomment-768759323


   I don't think this fix is suitable,org.apache.rocketmq.store.MappedFile#isAbleToCommit returns true under three conditions
   1. this file is full
   2. more or equal than commitLeastPages pages have not committed
   3. commitLeastPages less than 0
   
   this means commit action can be happened on these conditions,not just more or equal than commitLeastPages pages have not committed.so the origional judgement as following is ok
   > writePos - this.committedPosition.get() > 0


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



[GitHub] [rocketmq] coveralls commented on pull request #2346: [ISSUE #2338] use commitLeastPages parameters and substitute 'lastCom…

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #2346:
URL: https://github.com/apache/rocketmq/pull/2346#issuecomment-706812605


   
   [![Coverage Status](https://coveralls.io/builds/34092076/badge)](https://coveralls.io/builds/34092076)
   
   Coverage decreased (-0.05%) to 51.406% when pulling **1626356ec60b79b2130e94a34fb475c88c5abd73 on spiritsx:develop** into **c932941f30803257579b118571a735a3d464a8a0 on apache:develop**.
   


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



[GitHub] [rocketmq] CleverZiv commented on pull request #2346: [ISSUE #2338] Using commitLeastPages parameters and substituting 'lastCom…

Posted by GitBox <gi...@apache.org>.
CleverZiv commented on pull request #2346:
URL: https://github.com/apache/rocketmq/pull/2346#issuecomment-874584159


   > I don't think this fix is suitable,org.apache.rocketmq.store.MappedFile#isAbleToCommit returns true under three conditions
   > 
   > 1. this file is full
   > 2. more or equal than commitLeastPages pages have not committed
   > 3. commitLeastPages less than 0
   > 
   > this means commit action can be happened on these conditions,not just more or equal than commitLeastPages pages have not committed.so the origional judgement as following is ok
   > 
   > > writePos - this.committedPosition.get() > 0
   
   I agree with you. And I’m not sure if this is correct, it make me confused


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] CleverZiv commented on pull request #2346: [ISSUE #2338] Using commitLeastPages parameters and substituting 'lastCom…

Posted by GitBox <gi...@apache.org>.
CleverZiv commented on pull request #2346:
URL: https://github.com/apache/rocketmq/pull/2346#issuecomment-874584159


   > I don't think this fix is suitable,org.apache.rocketmq.store.MappedFile#isAbleToCommit returns true under three conditions
   > 
   > 1. this file is full
   > 2. more or equal than commitLeastPages pages have not committed
   > 3. commitLeastPages less than 0
   > 
   > this means commit action can be happened on these conditions,not just more or equal than commitLeastPages pages have not committed.so the origional judgement as following is ok
   > 
   > > writePos - this.committedPosition.get() > 0
   
   I agree with you. And I’m not sure if this is correct, it make me confused


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] vongosling merged pull request #2346: [ISSUE #2338] Using commitLeastPages parameters and substituting 'lastCom…

Posted by GitBox <gi...@apache.org>.
vongosling merged pull request #2346:
URL: https://github.com/apache/rocketmq/pull/2346


   


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