[GitHub] [rocketmq] CodeIngL commented on a change in pull request #1536: [ISSUE #1535] Fix ha sync transfer timeout

2019-10-16 Thread GitBox
CodeIngL commented on a change in pull request #1536: [ISSUE #1535] Fix ha sync 
transfer timeout
URL: https://github.com/apache/rocketmq/pull/1536#discussion_r335817655
 
 

 ##
 File path: store/src/main/java/org/apache/rocketmq/store/ha/HAService.java
 ##
 @@ -280,9 +280,14 @@ private void doWaitTransfer() {
 if (!this.requestsRead.isEmpty()) {
 for (CommitLog.GroupCommitRequest req : this.requestsRead) 
{
 boolean transferOK = 
HAService.this.push2SlaveMaxOffset.get() >= req.getNextOffset();
-for (int i = 0; !transferOK && i < 5; i++) {
+long waitUntillWhen = 
HAService.this.defaultMessageStore.getSystemClock().now()
++ 
HAService.this.defaultMessageStore.getMessageStoreConfig().getSyncFlushTimeout();
+while 
(HAService.this.defaultMessageStore.getSystemClock().now() < waitUntillWhen) {
 
 Review comment:
   you should check transferok to reduce unnecessary block。


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [rocketmq] coveralls edited a comment on issue #1529: [ISSUE #1528] mocking related functions to make producer get right topicrouteinfo and invoke callback functions

2019-10-16 Thread GitBox
coveralls edited a comment on issue #1529: [ISSUE #1528] mocking related 
functions to make producer get right topicrouteinfo and invoke callback 
functions
URL: https://github.com/apache/rocketmq/pull/1529#issuecomment-542551794
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/26363822/badge)](https://coveralls.io/builds/26363822)
   
   Coverage increased (+0.2%) to 50.454% when pulling 
**d9fbb23dd49782651ddb376ffb99b615129aa9dc on keranbingaa:unit-test** into 
**7c469fe949929ea039dfd8a6310db2f350ca316b 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [rocketmq-client-cpp] ifplusor commented on issue #197: When the rokcetmq cluster network is slightly interrupted, the consumer will coredump

2019-10-16 Thread GitBox
ifplusor commented on issue #197: When the rokcetmq cluster network is slightly 
interrupted, the consumer will coredump
URL: 
https://github.com/apache/rocketmq-client-cpp/issues/197#issuecomment-542881461
 
 
   The version(rocketmq-client-cpp-1.2.0) has some bugs in network layer, 
please use latest version.
   And I maintain another branch, I hope you will try it out. The repo is: 
https://github.com/ifplusor/rocketmq-client-cpp/tree/re-dev


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [rocketmq] coveralls edited a comment on issue #1422: [RIP-16]Support request/response pattern

2019-10-16 Thread GitBox
coveralls edited a comment on issue #1422: [RIP-16]Support request/response 
pattern
URL: https://github.com/apache/rocketmq/pull/1422#issuecomment-531618889
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/26349213/badge)](https://coveralls.io/builds/26349213)
   
   Coverage increased (+0.8%) to 50.319% when pulling 
**b6e4be83c7a4bddb56eedadd01e0a344ea429ff1 on qqeasonchen:rocketmq-dev-rpc** 
into **61f4f99b884d6b1d716414b14ed2e494d201bebe 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [rocketmq] qqeasonchen edited a comment on issue #1422: [RIP-16]Support request/response pattern

2019-10-16 Thread GitBox
qqeasonchen edited a comment on issue #1422: [RIP-16]Support request/response 
pattern
URL: https://github.com/apache/rocketmq/pull/1422#issuecomment-542492927
 
 
   > [Discuss]
   > Firstly, I wonder whether need a dependent ReplyMessageProcessor here, for 
the reply message, I think it just is a message that needs to push to the 
producer directly for accelerating, so how about just implement the 
executeSendMessageHookBefore method for push the message directly?
   > 
   > Another, compared with just starting a consumer in the producer side to 
consume a reply message from the ReplyTo topic, what are the advantages of 
current implementation? it seems that the current practice is difficult to 
achieve reliable asynchronous transmission, used in scenarios where message 
calls cannot fail. but this implementation indeed reduced response latency, 
especially in the condition that ReputService is a little busy :)
   
   =
   1. It's a  feasible way to implement with 'executeSendMessageHookBefore', 
Adding ReplyMessageProcessor meant to make code more clearly. 
ReplyMessageProcessor push reply message to producer and store message, so it 
needs to handle both push result and put message result.  If implement with 
`executeSendMessageHookBefore`, it would be a little more complex to handle the 
two result and return to producer. Both implement is Ok.
   2. There is a problem that rebalance result would change when new instance 
start or old instance stop.  It is more complex to guarantee that reply message 
would be deliver to accurate producer.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [rocketmq-client-python] codecov-io commented on issue #52: Upstream rocketmq-python

2019-10-16 Thread GitBox
codecov-io commented on issue #52: Upstream rocketmq-python
URL: 
https://github.com/apache/rocketmq-client-python/pull/52#issuecomment-542598460
 
 
   # 
[Codecov](https://codecov.io/gh/apache/rocketmq-client-python/pull/52?src=pr=h1)
 Report
   > :exclamation: No coverage uploaded for pull request base 
(`ctypes@95a5a38`). [Click here to learn what that 
means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
   > The diff coverage is `83.65%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/rocketmq-client-python/pull/52/graphs/tree.svg?width=650=R8XGgfcUMG=150=pr)](https://codecov.io/gh/apache/rocketmq-client-python/pull/52?src=pr=tree)
   
   ```diff
   @@Coverage Diff@@
   ## ctypes  #52   +/-   ##
   =
 Coverage  ?   83.65%   
   =
 Files ?4   
 Lines ?  630   
 Branches  ?0   
   =
 Hits  ?  527   
 Misses?  103   
 Partials  ?0
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/rocketmq-client-python/pull/52?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[rocketmq/consts.py](https://codecov.io/gh/apache/rocketmq-client-python/pull/52/diff?src=pr=tree#diff-cm9ja2V0bXEvY29uc3RzLnB5)
 | `100% <100%> (ø)` | |
   | 
[rocketmq/client.py](https://codecov.io/gh/apache/rocketmq-client-python/pull/52/diff?src=pr=tree#diff-cm9ja2V0bXEvY2xpZW50LnB5)
 | `68.83% <68.83%> (ø)` | |
   | 
[rocketmq/exceptions.py](https://codecov.io/gh/apache/rocketmq-client-python/pull/52/diff?src=pr=tree#diff-cm9ja2V0bXEvZXhjZXB0aW9ucy5weQ==)
 | `91.93% <91.93%> (ø)` | |
   | 
[rocketmq/ffi.py](https://codecov.io/gh/apache/rocketmq-client-python/pull/52/diff?src=pr=tree#diff-cm9ja2V0bXEvZmZpLnB5)
 | `99.15% <99.15%> (ø)` | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/rocketmq-client-python/pull/52?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/rocketmq-client-python/pull/52?src=pr=footer).
 Last update 
[95a5a38...fb2b7e8](https://codecov.io/gh/apache/rocketmq-client-python/pull/52?src=pr=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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [rocketmq] BeiKeJieDeLiuLangMao commented on issue #686: MQFaultStrategy optimize

2019-10-16 Thread GitBox
BeiKeJieDeLiuLangMao commented on issue #686: MQFaultStrategy optimize
URL: https://github.com/apache/rocketmq/pull/686#issuecomment-542574225
 
 
   > public class ThreadLocalIndex {
   > private final ThreadLocal threadLocalIndex = new ThreadLocal();
   > private final Random random = new Random();
   > 
   > ```
   > public int getAndIncrement() {
   > Integer index = this.threadLocalIndex.get();
   > if (null == index) {
   > index = Math.abs(random.nextInt());
   > if (index < 0)
   > index = 0;
   > this.threadLocalIndex.set(index);
   > }
   > 
   > index = Math.abs(index + 1);
   > if (index < 0)
   > index = 0;
   > 
   > this.threadLocalIndex.set(index);
   > return index;
   > }
   > ```
   > 
   > }
   > 
   > 
可以看到whichItemWorst在第一次getAndIncrement的时候,也没保证一定是0.,而是随机的。意味着有可能选到一个统计视图上处理中间的broker,并不是最优的,至少从统计视图上不是最优的。
   
   我觉得它可能不是每次都追求一定要发给最优节点,就如图函数名一样它是 pickOneAtLeast 而不是 pickBestOne,你可以看到无论是 
pickOneAtLeast 还是 whichItemWorst.getAndIncrement 
都加入了很多的随机因素,他恐怕是怕如果发生网络问题后出现所有请求都打向单一节点(index0)的情况, 
如果所有请求都打向同一个节点的话,可能会造成服务无法承受这么大压力,所以它用了很多随机因素来均衡这部分流量,但是他也不是完全随机,它多多少少参考了统计视图的结果。


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [rocketmq] amwyyyy opened a new issue #1538: Link to Alibaba Cloud MQ using version 4.5.1, unable to view message track

2019-10-16 Thread GitBox
amw opened a new issue #1538: Link to Alibaba Cloud MQ using version 4.5.1, 
unable to view message track
URL: https://github.com/apache/rocketmq/issues/1538
 
 
   When viewing the message track page, the consumption status has always been 
“尚未消费” and is actually already consumed.
   ![WeWork 
Helper20191016155030](https://user-images.githubusercontent.com/8274512/66899038-df793280-f02c-11e9-8384-db6a53cdc351.png)
   
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [rocketmq] qingmg opened a new issue #1537: 官网文档 Simple Example 章节异步的代码案例运行会出异常

2019-10-16 Thread GitBox
qingmg opened a new issue #1537: 官网文档 Simple Example 章节异步的代码案例运行会出异常
URL: https://github.com/apache/rocketmq/issues/1537
 
 
   如题意,在 http://rocketmq.apache.org/docs/simple-example/ 中 2.2 的代码案例,在循环结束后,会直接 
shutdown 其中的 producer 实例,并没有等待消息先发出去,导致异常。
   而在源码中,是实例化了一个 CountDownLatch 对象,执行了其中的 await 方法。
   
   希望有空的话可以更新下官网中的文档。


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [rocketmq] CoderLan0668 commented on issue #686: MQFaultStrategy optimize

2019-10-16 Thread GitBox
CoderLan0668 commented on issue #686: MQFaultStrategy optimize
URL: https://github.com/apache/rocketmq/pull/686#issuecomment-542563081
 
 
   public class ThreadLocalIndex {
   private final ThreadLocal threadLocalIndex = new 
ThreadLocal();
   private final Random random = new Random();
   
   public int getAndIncrement() {
   Integer index = this.threadLocalIndex.get();
   if (null == index) {
   index = Math.abs(random.nextInt());
   if (index < 0)
   index = 0;
   this.threadLocalIndex.set(index);
   }
   
   index = Math.abs(index + 1);
   if (index < 0)
   index = 0;
   
   this.threadLocalIndex.set(index);
   return index;
   }
   }
   
   
可以看到whichItemWorst在第一次getAndIncrement的时候,也没保证一定是0.,而是随机的。意味着有可能选到一个统计视图上处理中间的broker,并不是最优的,至少从统计视图上不是最优的。
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [rocketmq-client-go] RongtongJin opened a new pull request #251: [ISSUE 250] Delete uesless GroupName and make subscribe method correct

2019-10-16 Thread GitBox
RongtongJin opened a new pull request #251: [ISSUE 250] Delete uesless 
GroupName and make subscribe method correct
URL: https://github.com/apache/rocketmq-client-go/pull/251
 
 
   …n and remove useless client config GroupName
   
   ## What is the purpose of the change
   
   fix #250 
 - GroupName in clientConfig  is useless
 - Subscribe method is not based on the last subscription
 - Subscribe method can pass in nil consumeFunc parameter
   
   ## Brief changelog
   
   - Delete GroupName
   - User can subscribe to the same topic multiple times, and the last 
subscription shall prevail.
   - User can not subscribe with nil consumeFunc parameter
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [rocketmq-client-go] RongtongJin opened a new issue #250: [master] GroupName is useless && Subscribe method is not based on the last subscription

2019-10-16 Thread GitBox
RongtongJin opened a new issue #250: [master] GroupName is useless && Subscribe 
method is not based on the last subscription
URL: https://github.com/apache/rocketmq-client-go/issues/250
 
 
   **BUG REPORT**  
   **Please add the branch name [Native]/[Master] at the header of the Isssue 
title.**
   
   1. Please describe the issue you observed:
   
 - GroupName in clientConfig  is useless
 - Subscribe method is not based on the last subscription
 - Subscribe method can pass in nil consumeFunc parameter


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [rocketmq] coveralls commented on issue #1529: [ISSUE #1528] mocking related functions to make producer get right topicrouteinfo and invoke callback functions

2019-10-16 Thread GitBox
coveralls commented on issue #1529: [ISSUE #1528] mocking related functions to 
make producer get right topicrouteinfo and invoke callback functions
URL: https://github.com/apache/rocketmq/pull/1529#issuecomment-542551794
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/26341025/badge)](https://coveralls.io/builds/26341025)
   
   Coverage increased (+0.07%) to 50.304% when pulling 
**3470906b01095bbed9d6567c3605bba3c5a2d49e on keranbingaa:unit-test** into 
**7c469fe949929ea039dfd8a6310db2f350ca316b 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [rocketmq] coveralls edited a comment on issue #1516: [ISSUE #1515] SYNC_MASTER could be change into pipeline manner

2019-10-16 Thread GitBox
coveralls edited a comment on issue #1516: [ISSUE #1515] SYNC_MASTER could be 
change into pipeline manner 
URL: https://github.com/apache/rocketmq/pull/1516#issuecomment-541831021
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/26340670/badge)](https://coveralls.io/builds/26340670)
   
   Coverage increased (+0.03%) to 50.265% when pulling 
**f6c05db9971ddca5f5b63432177405394663b51c on shenhui0509:sync_pipeline** into 
**7c469fe949929ea039dfd8a6310db2f350ca316b 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [rocketmq-client-python] messense opened a new pull request #52: Upstream rocketmq-python

2019-10-16 Thread GitBox
messense opened a new pull request #52: Upstream rocketmq-python
URL: https://github.com/apache/rocketmq-client-python/pull/52
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services