[GitHub] incubator-rocketmq pull request #155: [ROCKETMQ-280] improve dependency mana...

2017-08-24 Thread qqeasonchen
GitHub user qqeasonchen opened a pull request:

https://github.com/apache/incubator-rocketmq/pull/155

[ROCKETMQ-280] improve dependency management in parent pom



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/qqeasonchen/incubator-rocketmq develop

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-rocketmq/pull/155.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #155


commit 30f8898ef8a52b5183221ccd05dc9f7e35770285
Author: easoncchen 
Date:   2017-08-25T05:30:57Z

[ROCKETMQ-280] improve dependency management in parent pom




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq issue #153: [ROCKETMQ-272] Fix sync slave timeout when us...

2017-08-24 Thread Jaskey
Github user Jaskey commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/153
  
@evthoriz 

Would you please also point out that what kind of scenario  will this issue 
 be reproduced?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq-externals issue #27: [ROCKETMQ-268]add rocketmq-cpp code

2017-08-24 Thread vincentWangKB
Github user vincentWangKB commented on the issue:

https://github.com/apache/incubator-rocketmq-externals/pull/27
  
@lizhanhui namespace had been changed to rocketmq, thanks


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq issue #154: logistic error

2017-08-24 Thread coveralls
Github user coveralls commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/154
  

[![Coverage 
Status](https://coveralls.io/builds/12983796/badge)](https://coveralls.io/builds/12983796)

Coverage increased (+0.03%) to 38.808% when pulling 
**00d0fb673de8d8f5debe74a24179d6aa212d4ee4 on zwillim:patch-1** into 
**2ddb744b3157604ec87a82143c3100728589c6ec on apache:master**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq issue #154: logistic error

2017-08-24 Thread coveralls
Github user coveralls commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/154
  

[![Coverage 
Status](https://coveralls.io/builds/12983796/badge)](https://coveralls.io/builds/12983796)

Coverage increased (+0.03%) to 38.808% when pulling 
**00d0fb673de8d8f5debe74a24179d6aa212d4ee4 on zwillim:patch-1** into 
**2ddb744b3157604ec87a82143c3100728589c6ec on apache:master**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq pull request #154: logistic error

2017-08-24 Thread zwillim
GitHub user zwillim opened a pull request:

https://github.com/apache/incubator-rocketmq/pull/154

logistic error

line 62.
cannot test ${HOME}/tmpfs while making link to ./tmpfs
change "ln -s /dev/shm tmpfs" to "ln -s /dev/shm ${HOME}/tmpfs"

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zwillim/incubator-rocketmq patch-1

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-rocketmq/pull/154.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #154


commit 00d0fb673de8d8f5debe74a24179d6aa212d4ee4
Author: willim.z 
Date:   2017-08-25T02:35:57Z

logistic error

line 62.
cannot test ${HOME}/tmpfs while making link to ./tmpfs
change "ln -s /dev/shm tmpfs" to "ln -s /dev/shm ${HOME}/tmpfs"




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq issue #153: [ROCKETMQ-272] Fix sync slave timeout when us...

2017-08-24 Thread evthoriz
Github user evthoriz commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/153
  
@vongosling @zhouxinyu  The CI environment is not correctly set. Would you 
guys have a loot at that?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: [DISCUSS] Graduate Apache RocketMQ from podling to TLP

2017-08-24 Thread Dave Fisher
Hi -

Comdev recently updated QU30 to make sure that security issues are handled on a 
secure and private basis. The PPMC needs to change the answer to QU30 as JIRA 
is not a secure process.

Regards,
Dave

> On Aug 24, 2017, at 4:00 AM, Von Gosling  wrote:
> 
> Hi,
> 
> Of course, we have listed our committer and PMC make-up in evaluation list[1] 
> :-)
> 
> 
> [1] https://cwiki.apache.org/confluence/display/ROCKETMQ/Maturity+Evaluation 
> 
> 
> Best Regards,
> Von Gosling
> 
> 
>> 在 2017年8月24日,18:55,John D. Ament  写道:
>> 
>> Hi,
>> 
>> Would you be able to talk about committer and PMC diversity a bit?  When
>> RocketMQ came to the incubator, most of the developers were from Alibaba.
>> Please compare to [1] and let us know the affiliations of the prospective
>> PMC members.
>> 
>> [1]: https://wiki.apache.org/incubator/RocketMQProposal
>> 
>> On Thu, Aug 24, 2017 at 2:24 AM yukon  wrote:
>> 
>>> Hi,
>>> 
>>> We have updated the latest incubation status report to RocketMQ podling
>>> status page[1], also updated the resolution[2] according to
>>> Jim's suggestion.
>>> 
>>> Can we pick this thread up, sincerely hope IPMC can give some opinions to
>>> RocketMQ community.
>>> 
>>> [1] http://incubator.apache.org/projects/rocketmq.html
>>> [2]
>>> https://cwiki.apache.org/confluence/display/ROCKETMQ/Graduation+Checklist
>>> 
>>> Regards,
>>> yukon
>>> 
>>> On Wed, Aug 23, 2017 at 4:14 PM, Von Gosling 
>>> wrote:
>>> 
 Greetings Incubator,
 
 The RocketMQ podling has decided to pursue graduation to a TLP. The
 discuss thread[1] and The result of the RocketMQ vote in RocketMQ
>>> community
 is at [2][3]. Our podling status page has recently been updated and can
>>> be
 found here[4]. More graduation statement, including Maturity Evaluation,
 please refer to [5].
 
 Below, you can view the proposed TLP resolution which we'd like to
>>> present
 to the board with the support of the IPMC, after sufficient discussion
>>> here
 and subsequent IPMC vote.
 
 [1] https://lists.apache.org/thread.html/9a11743e18cf15c1c7ecbd6be7d204
 1453d5838a4ed2d1b8457f5dbc@%3Cprivate.rocketmq.apache.org%3E
 [2] https://lists.apache.org/thread.html/6fabcac0aeb8f649ee5e8ba2ab0c86
 7a01d3e836c9adbd9072dc738e@%3Cdev.rocketmq.apache.org%3E
 [3] https://lists.apache.org/thread.html/40cca6b958bdf0f9ec698ef35e5418
 7fe884600c1fed4f98a79c1c2c@%3Cdev.rocketmq.apache.org%3E
 [4] http://incubator.apache.org/projects/rocketmq.html
 [5] https://cwiki.apache.org/confluence/display/ROCKETMQ/
 Graduation+Checklist
 
 
 
 **
 Establish the Apache RocketMQ Project
 
 WHEREAS, the Board of Directors deems it to be in the best interests of
 the Foundation and consistent with the Foundation's purpose to establish
 a Project Management Committee charged with the creation and maintenance
 of open-source software, for distribution at no charge to the public,
 related to a fast, low latency, reliable, scalable, distributed, easy to
 use message-oriented middleware, especially for processing large amounts
 of streaming data.
 NOW, THEREFORE, BE IT RESOLVED, that a Project Management Committee
 (PMC), to be known as the "Apache RocketMQ Project", be and hereby is
 established pursuant to Bylaws of the Foundation; and be it further
 RESOLVED, that the Apache RocketMQ Project be and hereby is responsible
 for the creation and maintenance of software related to a fast, low
 latency, reliable, scalable, distributed, easy to use message-oriented
 middleware, especially for processing large amounts of streaming data;
 and be it further
 RESOLVED, that the office of "Vice President, Apache RocketMQ" be and
 hereby is created, the person holding such office to serve at the
 direction of the Board of Directors as the chair of the Apache RocketMQ
 Project, and to have primary responsibility for management of the
 projects within the scope of responsibility of the Apache RocketMQ
 Project; and be it further
 RESOLVED, that the persons listed immediately below be and hereby are
 appointed to serve as the initial members of the Apache RocketMQ
 Project:
 
 * Bsnyder 
 * Jmclean 
 * Jim 
 * Ningjiang 
 * Von Gosling 
 * Xiaorui Wang 
 * Xinyu Zhou 
 * Zhanhui Li 
 * Jixiang Jin 
 * Dongeforever 
 
 NOW, THEREFORE, BE IT FURTHER RESOLVED, that Xiaorui Wang be appointed to
 the office of Vice President, Apache RocketMQ, to serve in accordance
 

[GitHub] incubator-rocketmq issue #153: [ROCKETMQ-272] Fix sync slave timeout when us...

2017-08-24 Thread coveralls
Github user coveralls commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/153
  

[![Coverage 
Status](https://coveralls.io/builds/12971788/badge)](https://coveralls.io/builds/12971788)

Coverage increased (+0.02%) to 39.051% when pulling 
**6f2501a24a701368b6213fd5acb3355ebdaafeb6 on evthoriz:debug-ha** into 
**ca14a2d474b6c71143944ec95f7c28e23e15632d on apache:develop**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq issue #132: [ROCKETMQ-248] make ConsumeFromWhere work rig...

2017-08-24 Thread evthoriz
Github user evthoriz commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/132
  
@shroman @vongosling It seems that plenty of tests are associated with this 
modification, I will resubmit a patch when I complete the relevant integration 
test.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq pull request #153: [ROCKETMQ-272] Fix sync slave timeout ...

2017-08-24 Thread evthoriz
GitHub user evthoriz opened a pull request:

https://github.com/apache/incubator-rocketmq/pull/153

[ROCKETMQ-272] Fix sync slave timeout when using SYNC_MASTER

Jira: https://issues.apache.org/jira/browse/ROCKETMQ-272

The timeout logic doesn't work correctly.
Thread waiting in GroupTransferService may frequently waked up by 
ReadSocketService in HAConnection.
So the transfer logic may return soon and wake up the thread waiting for 
the HA handling, which will make the timeout value in HA handling useless.

This patch repairs the timeout logic in syncing, and also introduces an 
option `syncSlaveTimeout` in `MessageStoreConfig` to distinguish from the disk 
flush timeout option.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/evthoriz/incubator-rocketmq debug-ha

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-rocketmq/pull/153.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #153


commit 6f2501a24a701368b6213fd5acb3355ebdaafeb6
Author: evthoriz 
Date:   2017-08-24T11:50:20Z

[ROCKETMQ-272] Fix sync slave timeout when using SYNC_MASTER




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: [DISCUSS] Graduate Apache RocketMQ from podling to TLP

2017-08-24 Thread Von Gosling
Hi John,


Thanks for you explanation for AMM, I would like to complement an individual -> 
company mapping in our ME[1]. As for security aspect, not just for assessment, 
we would like to establish private channel in the website later :-)


[1] https://cwiki.apache.org/confluence/display/ROCKETMQ/Maturity+Evaluation 


Best Regards,
Von Gosling



> 在 2017年8月24日,19:06,John D. Ament  写道:
> 
> Also please understand that the Apache Maturity Model is something that
> helps the com dev team evaluate TLPs against.  Its relevance to a
> graduating podling is extremely small.
> 
> Also, if you want to discuss the AMM a bit, you have a bug in the security
> assessment that some other projects have hit as well.  The question should
> be "The project provides a well-documented, secure and private channel to
> report security issues, along with a documented way of responding to them.
> "  Thanks especially to Dave Fisher for finding this recently.
> 
> John
> 
> [1]:
> https://community.apache.org/apache-way/apache-project-maturity-model.html
> 
> On Thu, Aug 24, 2017 at 7:02 AM John D. Ament  wrote:
> 
>> Hi,
>> 
>> Could be that you have listed companies people work at.  However, I'm
>> looking for more of an individual -> company mapping.
>> 
>> John
>> 
>> 
>> On Thu, Aug 24, 2017 at 7:00 AM Von Gosling  wrote:
>> 
>>> Hi,
>>> 
>>> Of course, we have listed our committer and PMC make-up in evaluation
>>> list[1] :-)
>>> 
>>> 
>>> [1]
>>> https://cwiki.apache.org/confluence/display/ROCKETMQ/Maturity+Evaluation
>>> >> 
>>> Best Regards,
>>> Von Gosling
>>> 
>>> 
 在 2017年8月24日,18:55,John D. Ament  写道:
 
 Hi,
 
 Would you be able to talk about committer and PMC diversity a bit?  When
 RocketMQ came to the incubator, most of the developers were from
>>> Alibaba.
 Please compare to [1] and let us know the affiliations of the
>>> prospective
 PMC members.
 
 [1]: https://wiki.apache.org/incubator/RocketMQProposal
 
 On Thu, Aug 24, 2017 at 2:24 AM yukon  wrote:
 
> Hi,
> 
> We have updated the latest incubation status report to RocketMQ podling
> status page[1], also updated the resolution[2] according to
> Jim's suggestion.
> 
> Can we pick this thread up, sincerely hope IPMC can give some opinions
>>> to
> RocketMQ community.
> 
> [1] http://incubator.apache.org/projects/rocketmq.html
> [2]
> 
>>> https://cwiki.apache.org/confluence/display/ROCKETMQ/Graduation+Checklist
> 
> Regards,
> yukon
> 
> On Wed, Aug 23, 2017 at 4:14 PM, Von Gosling 
> wrote:
> 
>> Greetings Incubator,
>> 
>> The RocketMQ podling has decided to pursue graduation to a TLP. The
>> discuss thread[1] and The result of the RocketMQ vote in RocketMQ
> community
>> is at [2][3]. Our podling status page has recently been updated and
>>> can
> be
>> found here[4]. More graduation statement, including Maturity
>>> Evaluation,
>> please refer to [5].
>> 
>> Below, you can view the proposed TLP resolution which we'd like to
> present
>> to the board with the support of the IPMC, after sufficient discussion
> here
>> and subsequent IPMC vote.
>> 
>> [1]
>>> https://lists.apache.org/thread.html/9a11743e18cf15c1c7ecbd6be7d204
>> 1453d5838a4ed2d1b8457f5dbc@%3Cprivate.rocketmq.apache.org%3E
>> [2]
>>> https://lists.apache.org/thread.html/6fabcac0aeb8f649ee5e8ba2ab0c86
>> 7a01d3e836c9adbd9072dc738e@%3Cdev.rocketmq.apache.org%3E
>> [3]
>>> https://lists.apache.org/thread.html/40cca6b958bdf0f9ec698ef35e5418
>> 7fe884600c1fed4f98a79c1c2c@%3Cdev.rocketmq.apache.org%3E
>> [4] http://incubator.apache.org/projects/rocketmq.html
>> [5] https://cwiki.apache.org/confluence/display/ROCKETMQ/
>> Graduation+Checklist
>> 
>> 
>> 
>> **
>> Establish the Apache RocketMQ Project
>> 
>> WHEREAS, the Board of Directors deems it to be in the best interests
>>> of
>> the Foundation and consistent with the Foundation's purpose to
>>> establish
>> a Project Management Committee charged with the creation and
>>> maintenance
>> of open-source software, for distribution at no charge to the public,
>> related to a fast, low latency, reliable, scalable, distributed, easy
>>> to
>> use message-oriented middleware, especially for processing large
>>> amounts
>> of streaming data.
>> NOW, THEREFORE, BE IT RESOLVED, that a Project Management Committee
>> (PMC), to be known as the "Apache RocketMQ Project", be and hereby is
>> established pursuant to Bylaws of the Foundation; and be it further
>> RESOLVED, 

Re: [DISCUSS] Graduate Apache RocketMQ from podling to TLP

2017-08-24 Thread John D. Ament
Also please understand that the Apache Maturity Model is something that
helps the com dev team evaluate TLPs against.  Its relevance to a
graduating podling is extremely small.

Also, if you want to discuss the AMM a bit, you have a bug in the security
assessment that some other projects have hit as well.  The question should
be "The project provides a well-documented, secure and private channel to
report security issues, along with a documented way of responding to them.
"  Thanks especially to Dave Fisher for finding this recently.

John

[1]:
https://community.apache.org/apache-way/apache-project-maturity-model.html

On Thu, Aug 24, 2017 at 7:02 AM John D. Ament  wrote:

> Hi,
>
> Could be that you have listed companies people work at.  However, I'm
> looking for more of an individual -> company mapping.
>
> John
>
>
> On Thu, Aug 24, 2017 at 7:00 AM Von Gosling  wrote:
>
>> Hi,
>>
>> Of course, we have listed our committer and PMC make-up in evaluation
>> list[1] :-)
>>
>>
>> [1]
>> https://cwiki.apache.org/confluence/display/ROCKETMQ/Maturity+Evaluation
>> > >
>>
>> Best Regards,
>> Von Gosling
>>
>>
>> > 在 2017年8月24日,18:55,John D. Ament  写道:
>> >
>> > Hi,
>> >
>> > Would you be able to talk about committer and PMC diversity a bit?  When
>> > RocketMQ came to the incubator, most of the developers were from
>> Alibaba.
>> > Please compare to [1] and let us know the affiliations of the
>> prospective
>> > PMC members.
>> >
>> > [1]: https://wiki.apache.org/incubator/RocketMQProposal
>> >
>> > On Thu, Aug 24, 2017 at 2:24 AM yukon  wrote:
>> >
>> >> Hi,
>> >>
>> >> We have updated the latest incubation status report to RocketMQ podling
>> >> status page[1], also updated the resolution[2] according to
>> >> Jim's suggestion.
>> >>
>> >> Can we pick this thread up, sincerely hope IPMC can give some opinions
>> to
>> >> RocketMQ community.
>> >>
>> >> [1] http://incubator.apache.org/projects/rocketmq.html
>> >> [2]
>> >>
>> https://cwiki.apache.org/confluence/display/ROCKETMQ/Graduation+Checklist
>> >>
>> >> Regards,
>> >> yukon
>> >>
>> >> On Wed, Aug 23, 2017 at 4:14 PM, Von Gosling 
>> >> wrote:
>> >>
>> >>> Greetings Incubator,
>> >>>
>> >>> The RocketMQ podling has decided to pursue graduation to a TLP. The
>> >>> discuss thread[1] and The result of the RocketMQ vote in RocketMQ
>> >> community
>> >>> is at [2][3]. Our podling status page has recently been updated and
>> can
>> >> be
>> >>> found here[4]. More graduation statement, including Maturity
>> Evaluation,
>> >>> please refer to [5].
>> >>>
>> >>> Below, you can view the proposed TLP resolution which we'd like to
>> >> present
>> >>> to the board with the support of the IPMC, after sufficient discussion
>> >> here
>> >>> and subsequent IPMC vote.
>> >>>
>> >>> [1]
>> https://lists.apache.org/thread.html/9a11743e18cf15c1c7ecbd6be7d204
>> >>> 1453d5838a4ed2d1b8457f5dbc@%3Cprivate.rocketmq.apache.org%3E
>> >>> [2]
>> https://lists.apache.org/thread.html/6fabcac0aeb8f649ee5e8ba2ab0c86
>> >>> 7a01d3e836c9adbd9072dc738e@%3Cdev.rocketmq.apache.org%3E
>> >>> [3]
>> https://lists.apache.org/thread.html/40cca6b958bdf0f9ec698ef35e5418
>> >>> 7fe884600c1fed4f98a79c1c2c@%3Cdev.rocketmq.apache.org%3E
>> >>> [4] http://incubator.apache.org/projects/rocketmq.html
>> >>> [5] https://cwiki.apache.org/confluence/display/ROCKETMQ/
>> >>> Graduation+Checklist
>> >>>
>> >>>
>> >>>
>> >>> **
>> >>> Establish the Apache RocketMQ Project
>> >>>
>> >>> WHEREAS, the Board of Directors deems it to be in the best interests
>> of
>> >>> the Foundation and consistent with the Foundation's purpose to
>> establish
>> >>> a Project Management Committee charged with the creation and
>> maintenance
>> >>> of open-source software, for distribution at no charge to the public,
>> >>> related to a fast, low latency, reliable, scalable, distributed, easy
>> to
>> >>> use message-oriented middleware, especially for processing large
>> amounts
>> >>> of streaming data.
>> >>> NOW, THEREFORE, BE IT RESOLVED, that a Project Management Committee
>> >>> (PMC), to be known as the "Apache RocketMQ Project", be and hereby is
>> >>> established pursuant to Bylaws of the Foundation; and be it further
>> >>> RESOLVED, that the Apache RocketMQ Project be and hereby is
>> responsible
>> >>> for the creation and maintenance of software related to a fast, low
>> >>> latency, reliable, scalable, distributed, easy to use message-oriented
>> >>> middleware, especially for processing large amounts of streaming data;
>> >>> and be it further
>> >>> RESOLVED, that the office of "Vice President, Apache RocketMQ" be and
>> >>> hereby is created, the person holding such office to serve at the
>> >>> direction of the Board of Directors as the chair of the Apache
>> RocketMQ
>> >>> Project, and to have primary 

Re: [DISCUSS] Graduate Apache RocketMQ from podling to TLP

2017-08-24 Thread John D. Ament
Hi,

Could be that you have listed companies people work at.  However, I'm
looking for more of an individual -> company mapping.

John

On Thu, Aug 24, 2017 at 7:00 AM Von Gosling  wrote:

> Hi,
>
> Of course, we have listed our committer and PMC make-up in evaluation
> list[1] :-)
>
>
> [1]
> https://cwiki.apache.org/confluence/display/ROCKETMQ/Maturity+Evaluation <
> https://cwiki.apache.org/confluence/display/ROCKETMQ/Maturity+Evaluation>
>
> Best Regards,
> Von Gosling
>
>
> > 在 2017年8月24日,18:55,John D. Ament  写道:
> >
> > Hi,
> >
> > Would you be able to talk about committer and PMC diversity a bit?  When
> > RocketMQ came to the incubator, most of the developers were from Alibaba.
> > Please compare to [1] and let us know the affiliations of the prospective
> > PMC members.
> >
> > [1]: https://wiki.apache.org/incubator/RocketMQProposal
> >
> > On Thu, Aug 24, 2017 at 2:24 AM yukon  wrote:
> >
> >> Hi,
> >>
> >> We have updated the latest incubation status report to RocketMQ podling
> >> status page[1], also updated the resolution[2] according to
> >> Jim's suggestion.
> >>
> >> Can we pick this thread up, sincerely hope IPMC can give some opinions
> to
> >> RocketMQ community.
> >>
> >> [1] http://incubator.apache.org/projects/rocketmq.html
> >> [2]
> >>
> https://cwiki.apache.org/confluence/display/ROCKETMQ/Graduation+Checklist
> >>
> >> Regards,
> >> yukon
> >>
> >> On Wed, Aug 23, 2017 at 4:14 PM, Von Gosling 
> >> wrote:
> >>
> >>> Greetings Incubator,
> >>>
> >>> The RocketMQ podling has decided to pursue graduation to a TLP. The
> >>> discuss thread[1] and The result of the RocketMQ vote in RocketMQ
> >> community
> >>> is at [2][3]. Our podling status page has recently been updated and can
> >> be
> >>> found here[4]. More graduation statement, including Maturity
> Evaluation,
> >>> please refer to [5].
> >>>
> >>> Below, you can view the proposed TLP resolution which we'd like to
> >> present
> >>> to the board with the support of the IPMC, after sufficient discussion
> >> here
> >>> and subsequent IPMC vote.
> >>>
> >>> [1]
> https://lists.apache.org/thread.html/9a11743e18cf15c1c7ecbd6be7d204
> >>> 1453d5838a4ed2d1b8457f5dbc@%3Cprivate.rocketmq.apache.org%3E
> >>> [2]
> https://lists.apache.org/thread.html/6fabcac0aeb8f649ee5e8ba2ab0c86
> >>> 7a01d3e836c9adbd9072dc738e@%3Cdev.rocketmq.apache.org%3E
> >>> [3]
> https://lists.apache.org/thread.html/40cca6b958bdf0f9ec698ef35e5418
> >>> 7fe884600c1fed4f98a79c1c2c@%3Cdev.rocketmq.apache.org%3E
> >>> [4] http://incubator.apache.org/projects/rocketmq.html
> >>> [5] https://cwiki.apache.org/confluence/display/ROCKETMQ/
> >>> Graduation+Checklist
> >>>
> >>>
> >>>
> >>> **
> >>> Establish the Apache RocketMQ Project
> >>>
> >>> WHEREAS, the Board of Directors deems it to be in the best interests of
> >>> the Foundation and consistent with the Foundation's purpose to
> establish
> >>> a Project Management Committee charged with the creation and
> maintenance
> >>> of open-source software, for distribution at no charge to the public,
> >>> related to a fast, low latency, reliable, scalable, distributed, easy
> to
> >>> use message-oriented middleware, especially for processing large
> amounts
> >>> of streaming data.
> >>> NOW, THEREFORE, BE IT RESOLVED, that a Project Management Committee
> >>> (PMC), to be known as the "Apache RocketMQ Project", be and hereby is
> >>> established pursuant to Bylaws of the Foundation; and be it further
> >>> RESOLVED, that the Apache RocketMQ Project be and hereby is responsible
> >>> for the creation and maintenance of software related to a fast, low
> >>> latency, reliable, scalable, distributed, easy to use message-oriented
> >>> middleware, especially for processing large amounts of streaming data;
> >>> and be it further
> >>> RESOLVED, that the office of "Vice President, Apache RocketMQ" be and
> >>> hereby is created, the person holding such office to serve at the
> >>> direction of the Board of Directors as the chair of the Apache RocketMQ
> >>> Project, and to have primary responsibility for management of the
> >>> projects within the scope of responsibility of the Apache RocketMQ
> >>> Project; and be it further
> >>> RESOLVED, that the persons listed immediately below be and hereby are
> >>> appointed to serve as the initial members of the Apache RocketMQ
> >>> Project:
> >>>
> >>> * Bsnyder 
> >>> * Jmclean 
> >>> * Jim 
> >>> * Ningjiang 
> >>> * Von Gosling 
> >>> * Xiaorui Wang 
> >>> * Xinyu Zhou 
> >>> * Zhanhui Li 
> >>> * Jixiang Jin 
> >>> * Dongeforever 
> >>>
> >>> NOW, THEREFORE, BE IT FURTHER RESOLVED, that Xiaorui Wang be appointed
> to
> >>> the office of Vice President, Apache RocketMQ, 

Re: [DISCUSS] Graduate Apache RocketMQ from podling to TLP

2017-08-24 Thread Von Gosling
Hi,

Of course, we have listed our committer and PMC make-up in evaluation list[1] 
:-)


[1] https://cwiki.apache.org/confluence/display/ROCKETMQ/Maturity+Evaluation 


Best Regards,
Von Gosling


> 在 2017年8月24日,18:55,John D. Ament  写道:
> 
> Hi,
> 
> Would you be able to talk about committer and PMC diversity a bit?  When
> RocketMQ came to the incubator, most of the developers were from Alibaba.
> Please compare to [1] and let us know the affiliations of the prospective
> PMC members.
> 
> [1]: https://wiki.apache.org/incubator/RocketMQProposal
> 
> On Thu, Aug 24, 2017 at 2:24 AM yukon  wrote:
> 
>> Hi,
>> 
>> We have updated the latest incubation status report to RocketMQ podling
>> status page[1], also updated the resolution[2] according to
>> Jim's suggestion.
>> 
>> Can we pick this thread up, sincerely hope IPMC can give some opinions to
>> RocketMQ community.
>> 
>> [1] http://incubator.apache.org/projects/rocketmq.html
>> [2]
>> https://cwiki.apache.org/confluence/display/ROCKETMQ/Graduation+Checklist
>> 
>> Regards,
>> yukon
>> 
>> On Wed, Aug 23, 2017 at 4:14 PM, Von Gosling 
>> wrote:
>> 
>>> Greetings Incubator,
>>> 
>>> The RocketMQ podling has decided to pursue graduation to a TLP. The
>>> discuss thread[1] and The result of the RocketMQ vote in RocketMQ
>> community
>>> is at [2][3]. Our podling status page has recently been updated and can
>> be
>>> found here[4]. More graduation statement, including Maturity Evaluation,
>>> please refer to [5].
>>> 
>>> Below, you can view the proposed TLP resolution which we'd like to
>> present
>>> to the board with the support of the IPMC, after sufficient discussion
>> here
>>> and subsequent IPMC vote.
>>> 
>>> [1] https://lists.apache.org/thread.html/9a11743e18cf15c1c7ecbd6be7d204
>>> 1453d5838a4ed2d1b8457f5dbc@%3Cprivate.rocketmq.apache.org%3E
>>> [2] https://lists.apache.org/thread.html/6fabcac0aeb8f649ee5e8ba2ab0c86
>>> 7a01d3e836c9adbd9072dc738e@%3Cdev.rocketmq.apache.org%3E
>>> [3] https://lists.apache.org/thread.html/40cca6b958bdf0f9ec698ef35e5418
>>> 7fe884600c1fed4f98a79c1c2c@%3Cdev.rocketmq.apache.org%3E
>>> [4] http://incubator.apache.org/projects/rocketmq.html
>>> [5] https://cwiki.apache.org/confluence/display/ROCKETMQ/
>>> Graduation+Checklist
>>> 
>>> 
>>> 
>>> **
>>> Establish the Apache RocketMQ Project
>>> 
>>> WHEREAS, the Board of Directors deems it to be in the best interests of
>>> the Foundation and consistent with the Foundation's purpose to establish
>>> a Project Management Committee charged with the creation and maintenance
>>> of open-source software, for distribution at no charge to the public,
>>> related to a fast, low latency, reliable, scalable, distributed, easy to
>>> use message-oriented middleware, especially for processing large amounts
>>> of streaming data.
>>> NOW, THEREFORE, BE IT RESOLVED, that a Project Management Committee
>>> (PMC), to be known as the "Apache RocketMQ Project", be and hereby is
>>> established pursuant to Bylaws of the Foundation; and be it further
>>> RESOLVED, that the Apache RocketMQ Project be and hereby is responsible
>>> for the creation and maintenance of software related to a fast, low
>>> latency, reliable, scalable, distributed, easy to use message-oriented
>>> middleware, especially for processing large amounts of streaming data;
>>> and be it further
>>> RESOLVED, that the office of "Vice President, Apache RocketMQ" be and
>>> hereby is created, the person holding such office to serve at the
>>> direction of the Board of Directors as the chair of the Apache RocketMQ
>>> Project, and to have primary responsibility for management of the
>>> projects within the scope of responsibility of the Apache RocketMQ
>>> Project; and be it further
>>> RESOLVED, that the persons listed immediately below be and hereby are
>>> appointed to serve as the initial members of the Apache RocketMQ
>>> Project:
>>> 
>>> * Bsnyder 
>>> * Jmclean 
>>> * Jim 
>>> * Ningjiang 
>>> * Von Gosling 
>>> * Xiaorui Wang 
>>> * Xinyu Zhou 
>>> * Zhanhui Li 
>>> * Jixiang Jin 
>>> * Dongeforever 
>>> 
>>> NOW, THEREFORE, BE IT FURTHER RESOLVED, that Xiaorui Wang be appointed to
>>> the office of Vice President, Apache RocketMQ, to serve in accordance
>>> with and subject to the direction of the Board of Directors and the
>>> Bylaws of the Foundation until death, resignation, retirement, removal
>>> or disqualification, or until a successor is appointed; and be it
>>> further
>>> RESOLVED, that the initial Apache RocketMQ PMC be and hereby is tasked
>>> with the creation of a set of bylaws intended to encourage open
>>> development and increased participation 

[GitHub] incubator-rocketmq issue #146: [ROCKETMQ-265] fix consume queue’s data may...

2017-08-24 Thread vsair
Github user vsair commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/146
  
LGTM, but be careful to upgrade. If the situation already happened at a 
server, then upgrade to this feature, it will miss some messages. It would be 
better to have some mechanism to keep consistency between consume queue and 
commitlog 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: [DISCUSS] Graduate Apache RocketMQ from podling to TLP

2017-08-24 Thread John D. Ament
Hi,

Would you be able to talk about committer and PMC diversity a bit?  When
RocketMQ came to the incubator, most of the developers were from Alibaba.
Please compare to [1] and let us know the affiliations of the prospective
PMC members.

[1]: https://wiki.apache.org/incubator/RocketMQProposal

On Thu, Aug 24, 2017 at 2:24 AM yukon  wrote:

> Hi,
>
> We have updated the latest incubation status report to RocketMQ podling
> status page[1], also updated the resolution[2] according to
> Jim's suggestion.
>
> Can we pick this thread up, sincerely hope IPMC can give some opinions to
> RocketMQ community.
>
> [1] http://incubator.apache.org/projects/rocketmq.html
> [2]
> https://cwiki.apache.org/confluence/display/ROCKETMQ/Graduation+Checklist
>
> Regards,
> yukon
>
> On Wed, Aug 23, 2017 at 4:14 PM, Von Gosling 
> wrote:
>
> > Greetings Incubator,
> >
> > The RocketMQ podling has decided to pursue graduation to a TLP. The
> > discuss thread[1] and The result of the RocketMQ vote in RocketMQ
> community
> > is at [2][3]. Our podling status page has recently been updated and can
> be
> > found here[4]. More graduation statement, including Maturity Evaluation,
> > please refer to [5].
> >
> > Below, you can view the proposed TLP resolution which we'd like to
> present
> > to the board with the support of the IPMC, after sufficient discussion
> here
> > and subsequent IPMC vote.
> >
> > [1] https://lists.apache.org/thread.html/9a11743e18cf15c1c7ecbd6be7d204
> > 1453d5838a4ed2d1b8457f5dbc@%3Cprivate.rocketmq.apache.org%3E
> > [2] https://lists.apache.org/thread.html/6fabcac0aeb8f649ee5e8ba2ab0c86
> > 7a01d3e836c9adbd9072dc738e@%3Cdev.rocketmq.apache.org%3E
> > [3] https://lists.apache.org/thread.html/40cca6b958bdf0f9ec698ef35e5418
> > 7fe884600c1fed4f98a79c1c2c@%3Cdev.rocketmq.apache.org%3E
> > [4] http://incubator.apache.org/projects/rocketmq.html
> > [5] https://cwiki.apache.org/confluence/display/ROCKETMQ/
> > Graduation+Checklist
> >
> >
> >
> > **
> > Establish the Apache RocketMQ Project
> >
> > WHEREAS, the Board of Directors deems it to be in the best interests of
> > the Foundation and consistent with the Foundation's purpose to establish
> > a Project Management Committee charged with the creation and maintenance
> > of open-source software, for distribution at no charge to the public,
> > related to a fast, low latency, reliable, scalable, distributed, easy to
> > use message-oriented middleware, especially for processing large amounts
> > of streaming data.
> > NOW, THEREFORE, BE IT RESOLVED, that a Project Management Committee
> > (PMC), to be known as the "Apache RocketMQ Project", be and hereby is
> > established pursuant to Bylaws of the Foundation; and be it further
> > RESOLVED, that the Apache RocketMQ Project be and hereby is responsible
> > for the creation and maintenance of software related to a fast, low
> > latency, reliable, scalable, distributed, easy to use message-oriented
> > middleware, especially for processing large amounts of streaming data;
> > and be it further
> > RESOLVED, that the office of "Vice President, Apache RocketMQ" be and
> > hereby is created, the person holding such office to serve at the
> > direction of the Board of Directors as the chair of the Apache RocketMQ
> > Project, and to have primary responsibility for management of the
> > projects within the scope of responsibility of the Apache RocketMQ
> > Project; and be it further
> > RESOLVED, that the persons listed immediately below be and hereby are
> > appointed to serve as the initial members of the Apache RocketMQ
> > Project:
> >
> > * Bsnyder 
> > * Jmclean 
> > * Jim 
> > * Ningjiang 
> > * Von Gosling 
> > * Xiaorui Wang 
> > * Xinyu Zhou 
> > * Zhanhui Li 
> > * Jixiang Jin 
> > * Dongeforever 
> >
> > NOW, THEREFORE, BE IT FURTHER RESOLVED, that Xiaorui Wang be appointed to
> > the office of Vice President, Apache RocketMQ, to serve in accordance
> > with and subject to the direction of the Board of Directors and the
> > Bylaws of the Foundation until death, resignation, retirement, removal
> > or disqualification, or until a successor is appointed; and be it
> > further
> > RESOLVED, that the initial Apache RocketMQ PMC be and hereby is tasked
> > with the creation of a set of bylaws intended to encourage open
> > development and increased participation in the Apache RocketMQ Project;
> > and be it further
> > RESOLVED, that the Apache RocketMQ Project be and hereby is tasked with
> > the migration and rationalization of the Apache Incubator RocketMQ
> > podling; and be it further
> > RESOLVED, that all responsibilities pertaining to the Apache Incubator
> > RocketMQ podling encumbered upon the Apache Incubator PMC are hereafter
> > discharged.

[GitHub] incubator-rocketmq pull request #145: [ROCKETMQ-264]Fix unit test cost too l...

2017-08-24 Thread lindzh
Github user lindzh commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/145#discussion_r134975634
  
--- Diff: 
client/src/test/java/org/apache/rocketmq/client/consumer/rebalance/AllocateMessageQueueConsitentHashTest.java
 ---
@@ -92,9 +92,9 @@ public void testAllocate2() {
 
 @Test
 public void testRun100RandomCase() {
-for (int i = 0; i < 100; i++) {
-int consumerSize = new Random().nextInt(200) + 1;//1-200
-int queueSize = new Random().nextInt(100) + 1;//1-100
+for (int i = 0; i < 10; i++) {
+int consumerSize = new Random().nextInt(20) + 1;//1-20
--- End diff --

We aim at making test cost less time, make iteration count less is a good 
idea as unit test is only test for function.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq pull request #145: [ROCKETMQ-264]Fix unit test cost too l...

2017-08-24 Thread lindzh
Github user lindzh commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/145#discussion_r134974719
  
--- Diff: 
broker/src/test/java/org/apache/rocketmq/broker/BrokerControllerTest.java ---
@@ -37,16 +37,14 @@
  */
 @Test
 public void testBrokerRestart() throws Exception {
-for (int i = 0; i < 2; i++) {
-BrokerController brokerController = new BrokerController(
-new BrokerConfig(),
-new NettyServerConfig(),
-new NettyClientConfig(),
-new MessageStoreConfig());
-assertThat(brokerController.initialize());
-brokerController.start();
-brokerController.shutdown();
-}
+BrokerController brokerController = new BrokerController(
--- End diff --

As there is more whole startup in test case , I think there no need to do 
this. Any questions?IMO


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq pull request #145: [ROCKETMQ-264]Fix unit test cost too l...

2017-08-24 Thread lindzh
Github user lindzh commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/145#discussion_r134974332
  
--- Diff: 
broker/src/test/java/org/apache/rocketmq/broker/filter/MessageStoreWithFilterTest.java
 ---
@@ -201,177 +229,143 @@ public void dispatch(DispatchRequest request) {
 
 @Test
 public void testGetMessage_withFilterBitMapAndConsumerChanged() {
-int topicCount = 10, msgPerTopic = 10;
-ConsumerFilterManager filterManager = 
ConsumerFilterManagerTest.gen(topicCount, msgPerTopic);
-
-DefaultMessageStore master = null;
+List msgs = null;
 try {
-master = gen(filterManager);
+msgs = putMsg(master, topicCount, msgPerTopic);
 } catch (Exception e) {
 e.printStackTrace();
 assertThat(true).isFalse();
 }
 
+// sleep to wait for consume queue has been constructed.
 try {
-List msgs = null;
-try {
-msgs = putMsg(master, topicCount, msgPerTopic);
-} catch (Exception e) {
-e.printStackTrace();
-assertThat(true).isFalse();
-}
-
-// sleep to wait for consume queue has been constructed.
-try {
-Thread.sleep(1000);
-} catch (InterruptedException e) {
-e.printStackTrace();
-assertThat(true).isFalse();
-}
+Thread.sleep(200);
--- End diff --

At this time,there is no way to ensure CQ constructed except adding 
countdownlatch to CQ,if only in test,I think there is no need to do this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq pull request #145: [ROCKETMQ-264]Fix unit test cost too l...

2017-08-24 Thread vsair
Github user vsair commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/145#discussion_r134968491
  
--- Diff: 
store/src/test/java/org/apache/rocketmq/store/DefaultMessageStoreTest.java ---
@@ -97,54 +110,46 @@ public MessageExtBrokerInner buildMessage() {
 
 @Test
 public void testGroupCommit() throws Exception {
-long totalMsgs = 100;
+long totalMsgs = 10;
 QUEUE_TOTAL = 1;
 MessageBody = StoreMessage.getBytes();
-MessageStoreConfig messageStoreConfig = new MessageStoreConfig();
-messageStoreConfig.setMapedFileSizeCommitLog(1024 * 8);
-messageStoreConfig.setFlushDiskType(FlushDiskType.SYNC_FLUSH);
-MessageStore master = new DefaultMessageStore(messageStoreConfig, 
null, new MyMessageArrivingListener(), new BrokerConfig());
-boolean load = master.load();
-assertTrue(load);
+for (long i = 0; i < totalMsgs; i++) {
+messageStore.putMessage(buildMessage());
+}
 
-master.start();
-verifyThatMasterIsFunctional(totalMsgs, master);
+for (long i = 0; i < totalMsgs; i++) {
+GetMessageResult result = messageStore.getMessage("GROUP_A", 
"TOPIC_A", 0, i, 1024 * 1024, null);
+assertThat(result).isNotNull();
+result.release();
+}
+verifyThatMasterIsFunctional(totalMsgs, messageStore);
 }
 
 private void verifyThatMasterIsFunctional(long totalMsgs, MessageStore 
master) {
-try {
-for (long i = 0; i < totalMsgs; i++) {
-master.putMessage(buildMessage());
-}
-
-for (long i = 0; i < totalMsgs; i++) {
-GetMessageResult result = master.getMessage("GROUP_A", 
"TOPIC_A", 0, i, 1024 * 1024, null);
-assertThat(result).isNotNull();
-result.release();
-
-}
-} finally {
-master.shutdown();
-master.destroy();
+for (long i = 0; i < totalMsgs; i++) {
+master.putMessage(buildMessage());
+}
+
+for (long i = 0; i < totalMsgs; i++) {
+GetMessageResult result = master.getMessage("GROUP_A", 
"TOPIC_A", 0, i, 1024 * 1024, null);
+assertThat(result).isNotNull();
+result.release();
+
 }
 }
 
 @Test
 public void testPullSize() throws Exception {
-MessageStore messageStore = buildMessageStore();
-boolean load = messageStore.load();
-assertTrue(load);
-messageStore.start();
 String topic = "pullSizeTopic";
 
 for (int i = 0; i < 32; i++) {
 MessageExtBrokerInner messageExtBrokerInner = buildMessage();
 messageExtBrokerInner.setTopic(topic);
 messageExtBrokerInner.setQueueId(0);
-PutMessageResult putMessageResult = 
messageStore.putMessage(messageExtBrokerInner);
+messageStore.putMessage(messageExtBrokerInner);
 }
 //wait for consume queue build
-Thread.sleep(100);
+Thread.sleep(10);
--- End diff --

Is 10ms enough to build consume queue?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq pull request #145: [ROCKETMQ-264]Fix unit test cost too l...

2017-08-24 Thread vsair
Github user vsair commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/145#discussion_r134969821
  
--- Diff: 
store/src/test/java/org/apache/rocketmq/store/DefaultMessageStoreTest.java ---
@@ -43,15 +43,24 @@
 private SocketAddress BornHost;
 private SocketAddress StoreHost;
 private byte[] MessageBody;
+private MessageStore messageStore;
 
 @Before
 public void init() throws Exception {
 StoreHost = new InetSocketAddress(InetAddress.getLocalHost(), 
8123);
 BornHost = new 
InetSocketAddress(InetAddress.getByName("127.0.0.1"), 0);
+
+messageStore = buildMessageStore();
+boolean load = messageStore.load();
+assertTrue(load);
+messageStore.start();
 }
 
 @After
 public void destory() {
+messageStore.shutdown();
+messageStore.destroy();
--- End diff --

As i remember, method of destroy may not clean all files generated. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq pull request #145: [ROCKETMQ-264]Fix unit test cost too l...

2017-08-24 Thread vsair
Github user vsair commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/145#discussion_r134970377
  
--- Diff: 
store/src/test/java/org/apache/rocketmq/store/DefaultMessageStoreTest.java ---
@@ -97,54 +110,46 @@ public MessageExtBrokerInner buildMessage() {
 
 @Test
 public void testGroupCommit() throws Exception {
-long totalMsgs = 100;
+long totalMsgs = 10;
 QUEUE_TOTAL = 1;
 MessageBody = StoreMessage.getBytes();
-MessageStoreConfig messageStoreConfig = new MessageStoreConfig();
-messageStoreConfig.setMapedFileSizeCommitLog(1024 * 8);
-messageStoreConfig.setFlushDiskType(FlushDiskType.SYNC_FLUSH);
-MessageStore master = new DefaultMessageStore(messageStoreConfig, 
null, new MyMessageArrivingListener(), new BrokerConfig());
-boolean load = master.load();
-assertTrue(load);
+for (long i = 0; i < totalMsgs; i++) {
+messageStore.putMessage(buildMessage());
+}
 
-master.start();
-verifyThatMasterIsFunctional(totalMsgs, master);
+for (long i = 0; i < totalMsgs; i++) {
+GetMessageResult result = messageStore.getMessage("GROUP_A", 
"TOPIC_A", 0, i, 1024 * 1024, null);
+assertThat(result).isNotNull();
+result.release();
+}
+verifyThatMasterIsFunctional(totalMsgs, messageStore);
 }
 
 private void verifyThatMasterIsFunctional(long totalMsgs, MessageStore 
master) {
-try {
-for (long i = 0; i < totalMsgs; i++) {
-master.putMessage(buildMessage());
-}
-
-for (long i = 0; i < totalMsgs; i++) {
-GetMessageResult result = master.getMessage("GROUP_A", 
"TOPIC_A", 0, i, 1024 * 1024, null);
-assertThat(result).isNotNull();
-result.release();
-
-}
-} finally {
-master.shutdown();
-master.destroy();
+for (long i = 0; i < totalMsgs; i++) {
+master.putMessage(buildMessage());
+}
+
+for (long i = 0; i < totalMsgs; i++) {
+GetMessageResult result = master.getMessage("GROUP_A", 
"TOPIC_A", 0, i, 1024 * 1024, null);
+assertThat(result).isNotNull();
+result.release();
+
 }
 }
 
 @Test
 public void testPullSize() throws Exception {
-MessageStore messageStore = buildMessageStore();
-boolean load = messageStore.load();
-assertTrue(load);
-messageStore.start();
 String topic = "pullSizeTopic";
 
 for (int i = 0; i < 32; i++) {
 MessageExtBrokerInner messageExtBrokerInner = buildMessage();
 messageExtBrokerInner.setTopic(topic);
 messageExtBrokerInner.setQueueId(0);
-PutMessageResult putMessageResult = 
messageStore.putMessage(messageExtBrokerInner);
+messageStore.putMessage(messageExtBrokerInner);
 }
 //wait for consume queue build
-Thread.sleep(100);
+Thread.sleep(10);
--- End diff --

Is it enough to build consume queue ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq pull request #145: [ROCKETMQ-264]Fix unit test cost too l...

2017-08-24 Thread vsair
Github user vsair commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/145#discussion_r134970255
  
--- Diff: 
client/src/test/java/org/apache/rocketmq/client/consumer/rebalance/AllocateMessageQueueConsitentHashTest.java
 ---
@@ -92,9 +92,9 @@ public void testAllocate2() {
 
 @Test
 public void testRun100RandomCase() {
-for (int i = 0; i < 100; i++) {
-int consumerSize = new Random().nextInt(200) + 1;//1-200
-int queueSize = new Random().nextInt(100) + 1;//1-100
+for (int i = 0; i < 10; i++) {
+int consumerSize = new Random().nextInt(20) + 1;//1-20
--- End diff --

Does it spend too much time to allocate queue ?  If not, i think it does't 
matter to run 10 or 100 times.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq issue #146: [ROCKETMQ-265] fix consume queue’s data may...

2017-08-24 Thread coveralls
Github user coveralls commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/146
  

[![Coverage 
Status](https://coveralls.io/builds/12969337/badge)](https://coveralls.io/builds/12969337)

Coverage increased (+0.06%) to 38.832% when pulling 
**ae1094b40ad93c4d5b009cb1151a6e7dd3cdb471 on fuyou001:ROCKETMQ-265** into 
**2ddb744b3157604ec87a82143c3100728589c6ec on apache:master**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq issue #145: [ROCKETMQ-264]Fix unit test cost too long and...

2017-08-24 Thread vongosling
Github user vongosling commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/145
  
@Jaskey @vsair Looking forward to your opinion about this PR


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq issue #152: [ROCKETMQ-278]add clusterlist cmd by specifie...

2017-08-24 Thread coveralls
Github user coveralls commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/152
  

[![Coverage 
Status](https://coveralls.io/builds/12969125/badge)](https://coveralls.io/builds/12969125)

Coverage increased (+0.02%) to 39.046% when pulling 
**2df4cfc7dc3a59374251b5ac60cc76f536f97d89 on lindzh:add_clusterlist_cluster** 
into **ca14a2d474b6c71143944ec95f7c28e23e15632d on apache:develop**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq issue #152: [ROCKETMQ-278]add clusterlist cmd by specifie...

2017-08-24 Thread coveralls
Github user coveralls commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/152
  

[![Coverage 
Status](https://coveralls.io/builds/12969125/badge)](https://coveralls.io/builds/12969125)

Coverage increased (+0.02%) to 39.046% when pulling 
**2df4cfc7dc3a59374251b5ac60cc76f536f97d89 on lindzh:add_clusterlist_cluster** 
into **ca14a2d474b6c71143944ec95f7c28e23e15632d on apache:develop**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq issue #146: [ROCKETMQ-265] fix consume queue’s data may...

2017-08-24 Thread vongosling
Github user vongosling commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/146
  
LGTM, now~


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq pull request #145: [ROCKETMQ-264]Fix unit test cost too l...

2017-08-24 Thread shroman
Github user shroman commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/145#discussion_r134962143
  
--- Diff: 
client/src/test/java/org/apache/rocketmq/client/consumer/rebalance/AllocateMessageQueueConsitentHashTest.java
 ---
@@ -92,9 +92,9 @@ public void testAllocate2() {
 
 @Test
 public void testRun100RandomCase() {
-for (int i = 0; i < 100; i++) {
-int consumerSize = new Random().nextInt(200) + 1;//1-200
-int queueSize = new Random().nextInt(100) + 1;//1-100
+for (int i = 0; i < 10; i++) {
+int consumerSize = new Random().nextInt(20) + 1;//1-20
--- End diff --

@vongosling If you have stress tests for this, I think low numbers here are 
ok.
Btw, how do/will you verify it?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq issue #146: [ROCKETMQ-265] fix consume queue’s data may...

2017-08-24 Thread coveralls
Github user coveralls commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/146
  

[![Coverage 
Status](https://coveralls.io/builds/12968971/badge)](https://coveralls.io/builds/12968971)

Coverage decreased (-0.2%) to 38.601% when pulling 
**cf019d74bcf7fd0934e5d26f6070e2296525bf54 on fuyou001:ROCKETMQ-265** into 
**2ddb744b3157604ec87a82143c3100728589c6ec on apache:master**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq issue #150: [ROCKETMQ-273] return an expression when a fu...

2017-08-24 Thread kevin-better
Github user kevin-better commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/150
  
Travis CI build log ,is there something wrong ? : 


[https://travis-ci.org/apache/incubator-rocketmq/jobs/267873150](https://travis-ci.org/apache/incubator-rocketmq/jobs/267873150)

$ mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
Error: JAVA_HOME is not defined correctly.
  We cannot execute /usr/lib/jvm/java-7-oracle/bin/java
The command "eval mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B 
-V " failed. Retrying, 2 of 3.
Error: JAVA_HOME is not defined correctly.
  We cannot execute /usr/lib/jvm/java-7-oracle/bin/java
The command "eval mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B 
-V " failed. Retrying, 3 of 3.
Error: JAVA_HOME is not defined correctly.
  We cannot execute /usr/lib/jvm/java-7-oracle/bin/java
The command "eval mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B 
-V " failed 3 times.
The command "mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V" 
failed and exited with 1 during .
Your build has been stopped.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq issue #150: [ROCKETMQ-273] return an expression when a fu...

2017-08-24 Thread coveralls
Github user coveralls commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/150
  

[![Coverage 
Status](https://coveralls.io/builds/12968394/badge)](https://coveralls.io/builds/12968394)

Coverage increased (+0.01%) to 39.044% when pulling 
**752aeb5f56807794fa2706917c3bbb0930411c19 on kevin-better:develop** into 
**ca14a2d474b6c71143944ec95f7c28e23e15632d on apache:develop**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq issue #150: [ROCKETMQ-273] return an expression when a fu...

2017-08-24 Thread coveralls
Github user coveralls commented on the issue:

https://github.com/apache/incubator-rocketmq/pull/150
  

[![Coverage 
Status](https://coveralls.io/builds/12968394/badge)](https://coveralls.io/builds/12968394)

Coverage increased (+0.01%) to 39.044% when pulling 
**752aeb5f56807794fa2706917c3bbb0930411c19 on kevin-better:develop** into 
**ca14a2d474b6c71143944ec95f7c28e23e15632d on apache:develop**.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq pull request #150: [ROCKETMQ-273] return an expression wh...

2017-08-24 Thread kevin-better
Github user kevin-better commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/150#discussion_r134944925
  
--- Diff: 
store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java ---
@@ -1094,34 +1090,15 @@ private boolean checkInDiskByCommitOffset(long 
offsetPy, long maxOffsetPy) {
 }
 
 private boolean isTheBatchFull(int sizePy, int maxMsgNums, int 
bufferTotal, int messageTotal, boolean isInDisk) {
-
-if (0 == bufferTotal || 0 == messageTotal) {
-return false;
-}
-
-if (maxMsgNums <= messageTotal) {
-return true;
-}
-
-if (isInDisk) {
-if ((bufferTotal + sizePy) > 
this.messageStoreConfig.getMaxTransferBytesOnMessageInDisk()) {
-return true;
-}
-
-if (messageTotal > 
this.messageStoreConfig.getMaxTransferCountOnMessageInDisk() - 1) {
-return true;
-}
-} else {
-if ((bufferTotal + sizePy) > 
this.messageStoreConfig.getMaxTransferBytesOnMessageInMemory()) {
-return true;
-}
-
-if (messageTotal > 
this.messageStoreConfig.getMaxTransferCountOnMessageInMemory() - 1) {
-return true;
-}
-}
-
-return false;
+return(0 != bufferTotal && 0 != messageTotal)
--- End diff --

ok , only alter function isOSPageCacheBusy


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq pull request #146: [ROCKETMQ-265] fix consume queue’s d...

2017-08-24 Thread dongeforever
Github user dongeforever commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/146#discussion_r134941603
  
--- Diff: 
store/src/test/java/org/apache/rocketmq/store/ConsumeQueueTest.java ---
@@ -148,6 +148,52 @@ protected void deleteFile(File file) {
 }
 
 @Test
+public void 
test_putMessagePositionInfo_build_consume_queue_idempotent() {
+DefaultMessageStore messageStore = null;
+try {
+
+messageStore = gen();
+
+int totalMessages = 10;
+
+for (int i = 0; i < totalMessages; i++) {
+putMsg(messageStore);
+}
+Thread.sleep(5);
+
+ConsumeQueue cq = 
messageStore.getConsumeQueueTable().get(topic).get(queueId);
+Method method = 
cq.getClass().getDeclaredMethod("putMessagePositionInfo", long.class, 
int.class, long.class, long.class);
+
+assertThat(method).isNotNull();
+
+method.setAccessible(true);
+
+SelectMappedBufferResult result = 
messageStore.getCommitLog().getData(0);
+assertThat(result != null).isTrue();
+
+DispatchRequest dispatchRequest = 
messageStore.getCommitLog().checkMessageAndReturnSize(result.getByteBuffer(), 
false, false);
+
+assertThat(cq).isNotNull();
+
+Object dispatchResult = method.invoke(cq, 
dispatchRequest.getCommitLogOffset(),
+dispatchRequest.getMsgSize(), 
dispatchRequest.getTagsCode(), dispatchRequest.getConsumeQueueOffset());
+
+
assertThat(Boolean.parseBoolean(dispatchResult.toString())).isTrue();
+
+} catch (Exception e) {
+e.printStackTrace();
+assertThat(Boolean.FALSE).isTrue();
--- End diff --

It is better to remove trycatch  from unit test, let the test framework 
handle it.
Another suggestion:
Use a  list to hold all the generated MessageStores, and release them 
inside "@After"  function. This will make the test more clear and look simple 
without the finally block.
 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq pull request #145: [ROCKETMQ-264]Fix unit test cost too l...

2017-08-24 Thread vongosling
Github user vongosling commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/145#discussion_r134941453
  
--- Diff: 
client/src/test/java/org/apache/rocketmq/client/consumer/rebalance/AllocateMessageQueueConsitentHashTest.java
 ---
@@ -92,9 +92,9 @@ public void testAllocate2() {
 
 @Test
 public void testRun100RandomCase() {
-for (int i = 0; i < 100; i++) {
-int consumerSize = new Random().nextInt(200) + 1;//1-200
-int queueSize = new Random().nextInt(100) + 1;//1-100
+for (int i = 0; i < 10; i++) {
+int consumerSize = new Random().nextInt(20) + 1;//1-20
--- End diff --

@shroman I would like to verify the program correction though the specific 
trick not iteration count, especially in unit-test, thoughts ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq-externals issue #27: [ROCKETMQ-268]add rocketmq-cpp code

2017-08-24 Thread lizhanhui
Github user lizhanhui commented on the issue:

https://github.com/apache/incubator-rocketmq-externals/pull/27
  
Maybe, we can merge it and create JIRA tickets to polish the code. Any idea?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq pull request #150: [ROCKETMQ-273] return an expression wh...

2017-08-24 Thread lizhanhui
Github user lizhanhui commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/150#discussion_r134941070
  
--- Diff: 
store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java ---
@@ -1094,34 +1090,15 @@ private boolean checkInDiskByCommitOffset(long 
offsetPy, long maxOffsetPy) {
 }
 
 private boolean isTheBatchFull(int sizePy, int maxMsgNums, int 
bufferTotal, int messageTotal, boolean isInDisk) {
-
-if (0 == bufferTotal || 0 == messageTotal) {
-return false;
-}
-
-if (maxMsgNums <= messageTotal) {
-return true;
-}
-
-if (isInDisk) {
-if ((bufferTotal + sizePy) > 
this.messageStoreConfig.getMaxTransferBytesOnMessageInDisk()) {
-return true;
-}
-
-if (messageTotal > 
this.messageStoreConfig.getMaxTransferCountOnMessageInDisk() - 1) {
-return true;
-}
-} else {
-if ((bufferTotal + sizePy) > 
this.messageStoreConfig.getMaxTransferBytesOnMessageInMemory()) {
-return true;
-}
-
-if (messageTotal > 
this.messageStoreConfig.getMaxTransferCountOnMessageInMemory() - 1) {
-return true;
-}
-}
-
-return false;
+return(0 != bufferTotal && 0 != messageTotal)
--- End diff --

This one looks too complex to understand...I suggest to keep the original 
look-and-feel.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq pull request #146: [ROCKETMQ-265] fix consume queue’s d...

2017-08-24 Thread lizhanhui
Github user lizhanhui commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/146#discussion_r134940614
  
--- Diff: 
store/src/test/java/org/apache/rocketmq/store/ConsumeQueueTest.java ---
@@ -148,6 +148,52 @@ protected void deleteFile(File file) {
 }
 
 @Test
+public void 
test_putMessagePositionInfo_build_consume_queue_idempotent() {
+DefaultMessageStore messageStore = null;
+try {
+
+messageStore = gen();
+
+int totalMessages = 10;
+
+for (int i = 0; i < totalMessages; i++) {
+putMsg(messageStore);
+}
+Thread.sleep(5);
+
+ConsumeQueue cq = 
messageStore.getConsumeQueueTable().get(topic).get(queueId);
+Method method = 
cq.getClass().getDeclaredMethod("putMessagePositionInfo", long.class, 
int.class, long.class, long.class);
+
+assertThat(method).isNotNull();
+
+method.setAccessible(true);
+
+SelectMappedBufferResult result = 
messageStore.getCommitLog().getData(0);
+assertThat(result != null).isTrue();
+
+DispatchRequest dispatchRequest = 
messageStore.getCommitLog().checkMessageAndReturnSize(result.getByteBuffer(), 
false, false);
+
+assertThat(cq).isNotNull();
+
+Object dispatchResult = method.invoke(cq, 
dispatchRequest.getCommitLogOffset(),
+dispatchRequest.getMsgSize(), 
dispatchRequest.getTagsCode(), dispatchRequest.getConsumeQueueOffset());
+
+
assertThat(Boolean.parseBoolean(dispatchResult.toString())).isTrue();
+
+} catch (Exception e) {
+e.printStackTrace();
+assertThat(Boolean.FALSE).isTrue();
--- End diff --

Should directly fail it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq pull request #146: [ROCKETMQ-265] fix consume queue’s d...

2017-08-24 Thread vongosling
Github user vongosling commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/146#discussion_r134940285
  
--- Diff: 
broker/src/test/java/org/apache/rocketmq/broker/filter/MessageStoreWithFilterTest.java
 ---
@@ -238,7 +238,7 @@ public void 
testGetMessage_withFilterBitMapAndConsumerChanged() {
 
 // sleep to wait for consume queue has been constructed.
 try {
-Thread.sleep(1000);
+Thread.sleep(2001);
 } catch (InterruptedException e) {
 e.printStackTrace();
--- End diff --

I would like to recommend to remove it in test module


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq pull request #146: [ROCKETMQ-265] fix consume queue’s d...

2017-08-24 Thread vongosling
Github user vongosling commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/146#discussion_r134940242
  
--- Diff: store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java 
---
@@ -446,6 +446,13 @@ private boolean putMessagePositionInfo(final long 
offset, final int size, final
 
 if (cqOffset != 0) {
 long currentLogicOffset = mappedFile.getWrotePosition() + 
mappedFile.getFileFromOffset();
+
+if (expectLogicOffset < currentLogicOffset) {
+log.warn("build consume queue idempotent, 
expectLogicOffset: {} currentLogicOffset: {} Topic: {} QID: {} Diff: {}",
--- End diff --

How to understand the meaning of building consume queue idempotent?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq pull request #146: [ROCKETMQ-265] fix consume queue’s d...

2017-08-24 Thread lizhanhui
Github user lizhanhui commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/146#discussion_r134940511
  
--- Diff: 
broker/src/test/java/org/apache/rocketmq/broker/filter/MessageStoreWithFilterTest.java
 ---
@@ -238,7 +238,7 @@ public void 
testGetMessage_withFilterBitMapAndConsumerChanged() {
 
 // sleep to wait for consume queue has been constructed.
 try {
-Thread.sleep(1000);
+Thread.sleep(2001);
--- End diff --

Looks there is no such interface, maybe keep polling till it finds 
something for a period of time and claiming failure if timeout.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rocketmq pull request #146: [ROCKETMQ-265] fix consume queue’s d...

2017-08-24 Thread zhouxinyu
Github user zhouxinyu commented on a diff in the pull request:

https://github.com/apache/incubator-rocketmq/pull/146#discussion_r134938289
  
--- Diff: 
store/src/test/java/org/apache/rocketmq/store/ConsumeQueueTest.java ---
@@ -148,6 +148,52 @@ protected void deleteFile(File file) {
 }
 
 @Test
+public void 
test_putMessagePositionInfo_build_consume_queue_idempotent() {
+DefaultMessageStore messageStore = null;
+try {
+
+messageStore = gen();
+
+int totalMessages = 10;
+
+for (int i = 0; i < totalMessages; i++) {
+putMsg(messageStore);
+}
+Thread.sleep(5);
+
+ConsumeQueue cq = 
messageStore.getConsumeQueueTable().get(topic).get(queueId);
+Method method = 
cq.getClass().getDeclaredMethod("putMessagePositionInfo", long.class, 
int.class, long.class, long.class);
+
+assertThat(method).isNotNull();
+
+method.setAccessible(true);
+
+SelectMappedBufferResult result = 
messageStore.getCommitLog().getData(0);
+assertThat(result != null).isTrue();
+
+DispatchRequest dispatchRequest = 
messageStore.getCommitLog().checkMessageAndReturnSize(result.getByteBuffer(), 
false, false);
+
+assertThat(cq).isNotNull();
+
+Object dispatchResult = method.invoke(cq, 
dispatchRequest.getCommitLogOffset(),
+dispatchRequest.getMsgSize(), 
dispatchRequest.getTagsCode(), dispatchRequest.getConsumeQueueOffset());
+
+
assertThat(Boolean.parseBoolean(dispatchResult.toString())).isTrue();
+
+} catch (Exception e) {
+e.printStackTrace();
+assertThat(Boolean.FALSE).isTrue();
--- End diff --

`assertThat(Boolean.FALSE).isTrue()`, it's really a trick, there is no need 
to catch exception, we can just add exception to method signature.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---