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/12/30 10:06:10 UTC

[GitHub] [rocketmq] horizonzy opened a new pull request #2536: [ISSUE #2535] Use one variable value to log info when eventQueue's size more than 10000.

horizonzy opened a new pull request #2536:
URL: https://github.com/apache/rocketmq/pull/2536


   ## What is the purpose of the change
   
   Fix-#2535
   Use one variable value to log info when eventQueue's size more than 10000.


----------------------------------------------------------------
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] lizhiboo commented on a change in pull request #2536: [ISSUE #2535] Use one variable value to log info when eventQueue's size more than 10000.

Posted by GitBox <gi...@apache.org>.
lizhiboo commented on a change in pull request #2536:
URL: https://github.com/apache/rocketmq/pull/2536#discussion_r581954077



##########
File path: remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java
##########
@@ -569,10 +569,11 @@ public void operationComplete(ChannelFuture f) throws Exception {
         private final int maxSize = 10000;
 
         public void putNettyEvent(final NettyEvent event) {
-            if (this.eventQueue.size() <= maxSize) {
+            int currentSize = this.eventQueue.size();
+            if (currentSize <= maxSize) {
                 this.eventQueue.add(event);
             } else {
-                log.warn("event queue size[{}] enough, so drop this event {}", this.eventQueue.size(), event.toString());
+                log.warn("event queue size[{}] enough, so drop this event {}", currentSize, event.toString());

Review comment:
       IMO, print currentSize and maxSize will be better.




----------------------------------------------------------------
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] horizonzy commented on a change in pull request #2536: [ISSUE #2535] Use one variable value to log info when eventQueue's size more than 10000.

Posted by GitBox <gi...@apache.org>.
horizonzy commented on a change in pull request #2536:
URL: https://github.com/apache/rocketmq/pull/2536#discussion_r581986332



##########
File path: remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java
##########
@@ -569,10 +569,11 @@ public void operationComplete(ChannelFuture f) throws Exception {
         private final int maxSize = 10000;
 
         public void putNettyEvent(final NettyEvent event) {
-            if (this.eventQueue.size() <= maxSize) {
+            int currentSize = this.eventQueue.size();
+            if (currentSize <= maxSize) {
                 this.eventQueue.add(event);
             } else {
-                log.warn("event queue size[{}] enough, so drop this event {}", this.eventQueue.size(), event.toString());
+                log.warn("event queue size[{}] enough, so drop this event {}", currentSize, event.toString());

Review comment:
       please take a look the new msg.




----------------------------------------------------------------
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 edited a comment on pull request #2536: [ISSUE #2535] Use one variable value to log info when eventQueue's size more than 10000.

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #2536:
URL: https://github.com/apache/rocketmq/pull/2536#issuecomment-752405341


   
   [![Coverage Status](https://coveralls.io/builds/37412506/badge)](https://coveralls.io/builds/37412506)
   
   Coverage decreased (-0.01%) to 51.928% when pulling **bf9a47407554511a454e737646f93c0a40d90aa1 on horizonzy:fix-2535** into **0239421fa59b67c423cf9fcabf5cd6edda0c2076 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] coveralls commented on pull request #2536: [ISSUE #2535] Use one variable value to log info when eventQueue's size more than 10000.

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


   
   [![Coverage Status](https://coveralls.io/builds/36002587/badge)](https://coveralls.io/builds/36002587)
   
   Coverage decreased (-0.08%) to 51.862% when pulling **d10b15c679789066c8980c24f6663428e5cd5c7d on horizonzy:fix-2535** into **0239421fa59b67c423cf9fcabf5cd6edda0c2076 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] codecov-io commented on pull request #2536: [ISSUE #2535] Use one variable value to log info when eventQueue's size more than 10000.

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


   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/2536?src=pr&el=h1) Report
   > Merging [#2536](https://codecov.io/gh/apache/rocketmq/pull/2536?src=pr&el=desc) (d10b15c) into [develop](https://codecov.io/gh/apache/rocketmq/commit/0239421fa59b67c423cf9fcabf5cd6edda0c2076?el=desc) (0239421) will **decrease** coverage by `0.02%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/rocketmq/pull/2536/graphs/tree.svg?width=650&height=150&src=pr&token=4w0sxP1wZv)](https://codecov.io/gh/apache/rocketmq/pull/2536?src=pr&el=tree)
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #2536      +/-   ##
   =============================================
   - Coverage      45.97%   45.94%   -0.03%     
   + Complexity      4318     4316       -2     
   =============================================
     Files            547      547              
     Lines          36236    36237       +1     
     Branches        4808     4808              
   =============================================
   - Hits           16658    16648      -10     
   - Misses         17491    17503      +12     
   + Partials        2087     2086       -1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/2536?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...rocketmq/remoting/netty/NettyRemotingAbstract.java](https://codecov.io/gh/apache/rocketmq/pull/2536/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3JlbW90aW5nL25ldHR5L05ldHR5UmVtb3RpbmdBYnN0cmFjdC5qYXZh) | `50.73% <0.00%> (-0.19%)` | `22.00 <0.00> (ø)` | |
   | [...ain/java/org/apache/rocketmq/test/util/MQWait.java](https://codecov.io/gh/apache/rocketmq/pull/2536/diff?src=pr&el=tree#diff-dGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvdGVzdC91dGlsL01RV2FpdC5qYXZh) | `43.24% <0.00%> (-5.41%)` | `3.00% <0.00%> (ø%)` | |
   | [...ketmq/client/impl/consumer/PullMessageService.java](https://codecov.io/gh/apache/rocketmq/pull/2536/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9QdWxsTWVzc2FnZVNlcnZpY2UuamF2YQ==) | `71.11% <0.00%> (-4.45%)` | `8.00% <0.00%> (-1.00%)` | |
   | [...ketmq/common/protocol/body/ConsumerConnection.java](https://codecov.io/gh/apache/rocketmq/pull/2536/diff?src=pr&el=tree#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vcHJvdG9jb2wvYm9keS9Db25zdW1lckNvbm5lY3Rpb24uamF2YQ==) | `95.83% <0.00%> (-4.17%)` | `13.00% <0.00%> (-1.00%)` | |
   | [...org/apache/rocketmq/common/stats/StatsItemSet.java](https://codecov.io/gh/apache/rocketmq/pull/2536/diff?src=pr&el=tree#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvU3RhdHNJdGVtU2V0LmphdmE=) | `41.79% <0.00%> (-1.50%)` | `16.00% <0.00%> (-1.00%)` | |
   | [...che/rocketmq/namesrv/kvconfig/KVConfigManager.java](https://codecov.io/gh/apache/rocketmq/pull/2536/diff?src=pr&el=tree#diff-bmFtZXNydi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbmFtZXNydi9rdmNvbmZpZy9LVkNvbmZpZ01hbmFnZXIuamF2YQ==) | `59.18% <0.00%> (-1.03%)` | `11.00% <0.00%> (-1.00%)` | |
   | [...he/rocketmq/client/impl/consumer/ProcessQueue.java](https://codecov.io/gh/apache/rocketmq/pull/2536/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9Qcm9jZXNzUXVldWUuamF2YQ==) | `60.93% <0.00%> (-0.94%)` | `32.00% <0.00%> (ø%)` | |
   | [...e/rocketmq/client/impl/consumer/RebalanceImpl.java](https://codecov.io/gh/apache/rocketmq/pull/2536/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9SZWJhbGFuY2VJbXBsLmphdmE=) | `45.81% <0.00%> (-0.80%)` | `32.00% <0.00%> (-1.00%)` | |
   | [.../apache/rocketmq/logging/inner/LoggingBuilder.java](https://codecov.io/gh/apache/rocketmq/pull/2536/diff?src=pr&el=tree#diff-bG9nZ2luZy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbG9nZ2luZy9pbm5lci9Mb2dnaW5nQnVpbGRlci5qYXZh) | `63.60% <0.00%> (-0.32%)` | `3.00% <0.00%> (ø%)` | |
   | [...ava/org/apache/rocketmq/filter/util/BitsArray.java](https://codecov.io/gh/apache/rocketmq/pull/2536/diff?src=pr&el=tree#diff-ZmlsdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9maWx0ZXIvdXRpbC9CaXRzQXJyYXkuamF2YQ==) | `59.82% <0.00%> (ø)` | `30.00% <0.00%> (ø%)` | |
   | ... and [4 more](https://codecov.io/gh/apache/rocketmq/pull/2536/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/rocketmq/pull/2536?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/2536?src=pr&el=footer). Last update [0239421...d10b15c](https://codecov.io/gh/apache/rocketmq/pull/2536?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] horizonzy commented on a change in pull request #2536: [ISSUE #2535] Use one variable value to log info when eventQueue's size more than 10000.

Posted by GitBox <gi...@apache.org>.
horizonzy commented on a change in pull request #2536:
URL: https://github.com/apache/rocketmq/pull/2536#discussion_r581977955



##########
File path: remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java
##########
@@ -569,10 +569,11 @@ public void operationComplete(ChannelFuture f) throws Exception {
         private final int maxSize = 10000;
 
         public void putNettyEvent(final NettyEvent event) {
-            if (this.eventQueue.size() <= maxSize) {
+            int currentSize = this.eventQueue.size();
+            if (currentSize <= maxSize) {
                 this.eventQueue.add(event);
             } else {
-                log.warn("event queue size[{}] enough, so drop this event {}", this.eventQueue.size(), event.toString());
+                log.warn("event queue size[{}] enough, so drop this event {}", currentSize, event.toString());

Review comment:
       agree




----------------------------------------------------------------
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] yuz10 merged pull request #2536: [ISSUE #2535] Use one variable value to log info when eventQueue's size more than 10000.

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


   


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