[GitHub] Jason918 opened a new pull request #227: [ROCKETMQ-332] fix concurrent bug in MappedFileQueue#findMappedFileByOffset, which m?

2018-02-12 Thread GitBox
Jason918 opened a new pull request #227: [ROCKETMQ-332] fix concurrent bug in 
MappedFileQueue#findMappedFileByOffset, which m?
URL: https://github.com/apache/rocketmq/pull/227
 
 
   
   ## What is the purpose of the change
   
   fix concurrent bug in MappedFileQueue#findMappedFileByOffset, which may 
cause message loss.
   
   
   ## Brief changelog
   
   The origin bug only occurs when the mappedFileQueue is deleting mappedFiles 
from the head of the queue. So the main idea of this bug fix is to check if the 
firstMappedFile in the queue is changed. If it changed, we may get the wrong 
mappedFile, and we handle this by doing retries. 
   
   Finally, If it failed after 3 times, we will try to find the mappedFile by 
iterating through all the mappedFiles in the queue to ensure returning the 
right result (solution from zhouxinyu).
   
   
   ## Verifying this change
   
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
   - [x] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/projects/ROCKETMQ/issues/) filed for the 
change (usually before you start working on it). Trivial changes like typos do 
not require a JIRA issue. Your pull request should address just this issue, 
without pulling in other changes - one PR resolves one issue. 
   - [x] Format the pull request title like `[ROCKETMQ-XXX] Fix 
UnknownException when host config not exist`. Each commit in the pull request 
should have a meaningful subject line and body.
   - [x] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   - [x] Write necessary unit-test to verify your logic correction, more mock a 
little better when cross module dependency exist. If the new feature or 
significant change is committed, please remember to add integration-test in 
[test module](https://github.com/apache/rocketmq/tree/master/test).
   - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs 
checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install 
-DskipITs` to make sure unit-test pass. Run `mvn clean test-compile 
failsafe:integration-test`  to make sure integration-test pass.
   - [x] If this contribution is large, please file an [Apache Individual 
Contributor License Agreement](http://www.apache.org/licenses/#clas).
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] Jason918 commented on issue #227: [ROCKETMQ-332] fix concurrent bug in MappedFileQueue#findMappedFileByOffset, which m?

2018-02-12 Thread GitBox
Jason918 commented on issue #227: [ROCKETMQ-332] fix concurrent bug in 
MappedFileQueue#findMappedFileByOffset, which m?
URL: https://github.com/apache/rocketmq/pull/227#issuecomment-364865146
 
 
   @zhouxinyu hi~ Sorry for the delay. This is my fix for this bug in our 
production environment, please check this out. It's been so far so good. :)


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] Jason918 commented on issue #227: [ROCKETMQ-332] fix concurrent bug in MappedFileQueue#findMappedFileByOffset, which m?

2018-02-12 Thread GitBox
Jason918 commented on issue #227: [ROCKETMQ-332] fix concurrent bug in 
MappedFileQueue#findMappedFileByOffset, which m?
URL: https://github.com/apache/rocketmq/pull/227#issuecomment-364867106
 
 
   @zhouxinyu @dongeforever The continuous-integration failed in the 
rocketmq-remoting module, which is not modified in this PR. There seem to be 
some TLS related error. Any ideas ?


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


The source code on master branch can't pass unit test

2018-02-12 Thread KaiYuan Yang
How to reproduce the error:    just run "mvn clean install -DskipITs" on the 
latest code
Error 
message:org.apache.rocketmq.remoting.exception.RemotingSendRequestException: 
send request to  failed

 at 
org.apache.rocketmq.remoting.netty.NettyRemotingAbstract.invokeSyncImpl(NettyRemotingAbstract.java:389)
 at 
org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:369)
 at 
org.apache.rocketmq.remoting.TlsTest.requestThenAssertResponse(TlsTest.java:292)
 at 
org.apache.rocketmq.remoting.TlsTest.serverAcceptsUntrustedClientCert(TlsTest.java:198)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
 at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
 at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
 at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
 at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
 at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
 at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
 at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
 at org.junit.rules.RunRules.evaluate(RunRules.java:20)
 at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
 at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
 at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
 at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
 at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
 at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
 at 
org.mockito.internal.runners.DefaultInternalRunner$1.run(DefaultInternalRunner.java:68)
 at 
org.mockito.internal.runners.DefaultInternalRunner.run(DefaultInternalRunner.java:74)
 at org.mockito.internal.runners.StrictRunner.run(StrictRunner.java:39)
 at org.mockito.junit.MockitoJUnitRunner.run(MockitoJUnitRunner.java:142)
 at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
 at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
 at 
com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
 at 
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
 at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: javax.net.ssl.SSLHandshakeException: General SSLEngine problem
 at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1478)
 at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:535)
 at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:813)
 at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:781)
 at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
 at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1097)
 at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:968)
 at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:902)
 at 
io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411)
 at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248)
 at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:367)
 at 
io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:36)
 at 
io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:358)
 at 
io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:41)
 at 
io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
 at java.lang.Thread.run(Thread.java:748)
Caused by: javax.net.ssl.SSLHandshakeException: General SSLEngine problem
 at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
 at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1728)
 at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:304)
 at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
 at 
sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1514)
 at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
 at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026)
 at sun.security.ssl.Handshaker$1.run(Handshaker.java:966)
 at sun.security.ssl.Handshaker$1.run(Handshaker.java:963)
 at java.security

[GitHub] mark800 commented on issue #227: [ROCKETMQ-332] fix concurrent bug in MappedFileQueue#findMappedFileByOffset, which m?

2018-02-12 Thread GitBox
mark800 commented on issue #227: [ROCKETMQ-332] fix concurrent bug in 
MappedFileQueue#findMappedFileByOffset, which m?
URL: https://github.com/apache/rocketmq/pull/227#issuecomment-364868963
 
 
   Yes, the source code on master branch can't pass unit test
   It seems the cert files need to be renewed


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] zhouxinyu commented on issue #227: [ROCKETMQ-332] fix concurrent bug in MappedFileQueue#findMappedFileByOffset, which m?

2018-02-12 Thread GitBox
zhouxinyu commented on issue #227: [ROCKETMQ-332] fix concurrent bug in 
MappedFileQueue#findMappedFileByOffset, which m?
URL: https://github.com/apache/rocketmq/pull/227#issuecomment-364875725
 
 
   Please open PR based on the `develop` branch


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


Re: The source code on master branch can't pass unit test

2018-02-12 Thread yukon
I have updated the test certs
please try again

KaiYuan Yang 于2018年2月12日 周一下午5:24写道:

> How to reproduce the error:just run "mvn clean install -DskipITs" on
> the latest code
> Error
> message:org.apache.rocketmq.remoting.exception.RemotingSendRequestException: 
> send request to  127.0.0.1:> failed
>
>
>  at 
> org.apache.rocketmq.remoting.netty.NettyRemotingAbstract.invokeSyncImpl(NettyRemotingAbstract.java:389)
>
>  at 
> org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:369)
>
>  at 
> org.apache.rocketmq.remoting.TlsTest.requestThenAssertResponse(TlsTest.java:292)
>
>  at 
> org.apache.rocketmq.remoting.TlsTest.serverAcceptsUntrustedClientCert(TlsTest.java:198)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>  at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>
>  at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:498)
>
>  at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>
>  at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>
>  at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>
>  at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>
>  at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>
>  at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>  at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
>  at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
>  at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>  at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
>
>  at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
>
>  at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
>  at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
>  at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
>  at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
>  at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
>  at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
>  at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
>
>  at 
> org.mockito.internal.runners.DefaultInternalRunner$1.run(DefaultInternalRunner.java:68)
>
>  at 
> org.mockito.internal.runners.DefaultInternalRunner.run(DefaultInternalRunner.java:74)
>  at org.mockito.internal.runners.StrictRunner.run(StrictRunner.java:39)
>  at org.mockito.junit.MockitoJUnitRunner.run(MockitoJUnitRunner.java:142)
>  at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
>
>  at 
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
>
>  at 
> com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
>
>  at 
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
>  at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
> Caused by: javax.net.ssl.SSLHandshakeException: General SSLEngine problem
>  at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1478)
>  at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:535)
>  at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:813)
>  at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:781)
>  at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
>  at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1097)
>  at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:968)
>  at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:902)
>
>  at 
> io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411)
>
>  at 
> io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248)
>
>  at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:367)
>
>  at 
> io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:36)
>
>  at 
> io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:358)
>
>  at 
> io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:41)
>
>  at 
> io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
>  at java.lang.Thread.run(Thread.java:748)
> Caused by: javax.net.ssl.SSLHandshakeException: General SSLEngine problem
>  at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
>  at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1728)
>  at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:304)
>  at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
>
>  at 
> sun.security.ssl.ClientHa

[GitHub] coveralls commented on issue #226: [ROCKETMQ-346] One message could only has one tag??tags? is confusing

2018-02-12 Thread GitBox
coveralls commented on issue #226: [ROCKETMQ-346] One message could only has 
one tag??tags? is confusing
URL: https://github.com/apache/rocketmq/pull/226#issuecomment-365143777
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/15496912/badge)](https://coveralls.io/builds/15496912)
   
   Coverage increased (+0.03%) to 39.907% when pulling 
**76bec8a4f772cf41a296ed8dc4549fb6b30f6899 on mark800:ROCKETMQ-346** into 
**2d43e75eb3789b02dd4f65865ac34ad10652f6ce on apache:master**.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


Participating in GSoC 2018 with RocketMQ

2018-02-12 Thread Sudaraka Yasindu
Hi all,
I am very much interested in applying for GSoC 2018 with RocketMQ. I
already started setting up my dev environment. Is this the mailing list
where should I continue my conversation ? Thank you.

Sudaraka Jayathilaka
*Undergraduate*
Department of Computer Science and Engineering
University of Moratuwa
m: +94715271890 <+94%2071%20527%201890>
e: sudarakayasi...@gmail.com