[jira] [Commented] (RATIS-225) Grpc LogAppender should update next index on heartbeat reply

2018-04-12 Thread Lokesh Jain (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16436732#comment-16436732
 ] 

Lokesh Jain commented on RATIS-225:
---

[~szetszwo] v2 patch adds a test. GrpcLogAppender can not use 
LogAppender#onSuccess as the follower next index is updated on 
GrpcLogAppender#appendLog:147. If I remove it will change the way append 
entries are sent.

> Grpc LogAppender should update next index on heartbeat reply
> 
>
> Key: RATIS-225
> URL: https://issues.apache.org/jira/browse/RATIS-225
> Project: Ratis
>  Issue Type: Improvement
>Reporter: Lokesh Jain
>Assignee: Lokesh Jain
>Priority: Major
> Attachments: RATIS-225.002.patch
>
>
> Grpc LogAppender currently does not update next index in heartbeat reply. In 
> case the previous appendEntry times out the next index may not be updated in 
> the leader for a long time. Therefore we need to update the next index on a 
> heartbeat success.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (RATIS-225) Grpc LogAppender should update next index on heartbeat reply

2018-04-12 Thread Lokesh Jain (JIRA)

 [ 
https://issues.apache.org/jira/browse/RATIS-225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lokesh Jain updated RATIS-225:
--
Attachment: RATIS-225.002.patch

> Grpc LogAppender should update next index on heartbeat reply
> 
>
> Key: RATIS-225
> URL: https://issues.apache.org/jira/browse/RATIS-225
> Project: Ratis
>  Issue Type: Improvement
>Reporter: Lokesh Jain
>Assignee: Lokesh Jain
>Priority: Major
> Attachments: RATIS-225.002.patch
>
>
> Grpc LogAppender currently does not update next index in heartbeat reply. In 
> case the previous appendEntry times out the next index may not be updated in 
> the leader for a long time. Therefore we need to update the next index on a 
> heartbeat success.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (RATIS-225) Grpc LogAppender should update next index on heartbeat reply

2018-04-12 Thread Lokesh Jain (JIRA)

 [ 
https://issues.apache.org/jira/browse/RATIS-225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lokesh Jain updated RATIS-225:
--
Attachment: (was: RATIS-225.001.patch)

> Grpc LogAppender should update next index on heartbeat reply
> 
>
> Key: RATIS-225
> URL: https://issues.apache.org/jira/browse/RATIS-225
> Project: Ratis
>  Issue Type: Improvement
>Reporter: Lokesh Jain
>Assignee: Lokesh Jain
>Priority: Major
>
> Grpc LogAppender currently does not update next index in heartbeat reply. In 
> case the previous appendEntry times out the next index may not be updated in 
> the leader for a long time. Therefore we need to update the next index on a 
> heartbeat success.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (RATIS-227) TestRaftWithGrpc.testBasicAppendEntriesWithAllReplication fails

2018-04-12 Thread Lokesh Jain (JIRA)

 [ 
https://issues.apache.org/jira/browse/RATIS-227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lokesh Jain updated RATIS-227:
--
Summary: TestRaftWithGrpc.testBasicAppendEntriesWithAllReplication fails  
(was: TestRaftWithGrpc.testBasicAppendEntriesWithAllReplication fails with 
IllegalStateException)

> TestRaftWithGrpc.testBasicAppendEntriesWithAllReplication fails
> ---
>
> Key: RATIS-227
> URL: https://issues.apache.org/jira/browse/RATIS-227
> Project: Ratis
>  Issue Type: Bug
>Reporter: Lokesh Jain
>Priority: Major
>
> The test fails after a few runs.
>  
> Running org.apache.ratis.grpc.TestRaftWithGrpc
> Tests run: 7, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 38.009 sec 
> <<< FAILURE! - in org.apache.ratis.grpc.TestRaftWithGrpc
> testBasicAppendEntriesWithAllReplication(org.apache.ratis.grpc.TestRaftWithGrpc)
>  Time elapsed: 6.347 sec <<< FAILURE!
> java.lang.AssertionError: expected:<10> but was:<11>
> testBasicAppendEntriesWithAllReplication(org.apache.ratis.grpc.TestRaftWithGrpc)
>  Time elapsed: 6.347 sec <<< FAILURE!
> java.lang.AssertionError: Unexpected exited.
> Caused by: org.apache.ratis.util.ExitUtils$ExitException: 
> StateMachineUpdater-s3: the StateMachineUpdater hits Throwable
> Caused by: java.lang.IllegalStateException: retry cache entry should be 
> pending: client-94C96ACF6473:5013:done
> Results :
> Failed tests:
> org.apache.ratis.grpc.TestRaftWithGrpc.testBasicAppendEntriesWithAllReplication(org.apache.ratis.grpc.TestRaftWithGrpc)
>  Run 1: 
> TestRaftWithGrpc>RaftBasicTests.testBasicAppendEntriesWithAllReplication:100->RaftBasicTests.runTestBasicAppendEntries:161->RaftBasicTests.lambda$runTestBasicAppendEntries$3:161
>  expected:<10> but was:<11>
>  Run 2: TestRaftWithGrpc>RaftBasicTests.tearDown:89 Unexpected exited.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (RATIS-227) TestRaftWithGrpc.testBasicAppendEntriesWithAllReplication fails with IllegalStateException

2018-04-12 Thread Lokesh Jain (JIRA)
Lokesh Jain created RATIS-227:
-

 Summary: TestRaftWithGrpc.testBasicAppendEntriesWithAllReplication 
fails with IllegalStateException
 Key: RATIS-227
 URL: https://issues.apache.org/jira/browse/RATIS-227
 Project: Ratis
  Issue Type: Bug
Reporter: Lokesh Jain


The test fails after a few runs.

 

Running org.apache.ratis.grpc.TestRaftWithGrpc
Tests run: 7, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 38.009 sec <<< 
FAILURE! - in org.apache.ratis.grpc.TestRaftWithGrpc
testBasicAppendEntriesWithAllReplication(org.apache.ratis.grpc.TestRaftWithGrpc)
 Time elapsed: 6.347 sec <<< FAILURE!
java.lang.AssertionError: expected:<10> but was:<11>

testBasicAppendEntriesWithAllReplication(org.apache.ratis.grpc.TestRaftWithGrpc)
 Time elapsed: 6.347 sec <<< FAILURE!
java.lang.AssertionError: Unexpected exited.
Caused by: org.apache.ratis.util.ExitUtils$ExitException: 
StateMachineUpdater-s3: the StateMachineUpdater hits Throwable
Caused by: java.lang.IllegalStateException: retry cache entry should be 
pending: client-94C96ACF6473:5013:done


Results :

Failed tests:
org.apache.ratis.grpc.TestRaftWithGrpc.testBasicAppendEntriesWithAllReplication(org.apache.ratis.grpc.TestRaftWithGrpc)
 Run 1: 
TestRaftWithGrpc>RaftBasicTests.testBasicAppendEntriesWithAllReplication:100->RaftBasicTests.runTestBasicAppendEntries:161->RaftBasicTests.lambda$runTestBasicAppendEntries$3:161
 expected:<10> but was:<11>
 Run 2: TestRaftWithGrpc>RaftBasicTests.tearDown:89 Unexpected exited.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (RATIS-219) Add configuration for timeout duration

2018-04-12 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16436230#comment-16436230
 ] 

Hadoop QA commented on RATIS-219:
-

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m 
25s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  0m  
8s{color} | {color:blue} Findbugs executables are not available. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:red}-1{color} | {color:red} test4tests {color} | {color:red}  0m  
0s{color} | {color:red} The patch doesn't appear to include any new or modified 
tests. Please justify why no new tests are needed for this patch. Also please 
list what manual steps were performed to verify this patch. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
24s{color} | {color:blue} Maven dependency ordering for branch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 13m 
53s{color} | {color:green} master passed {color} |
| {color:red}-1{color} | {color:red} compile {color} | {color:red}182m 
31s{color} | {color:red} root in master failed. {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
30s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
33s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m  
5s{color} | {color:blue} Maven dependency ordering for patch {color} |
| {color:red}-1{color} | {color:red} mvninstall {color} | {color:red}  7m 
19s{color} | {color:red} root in the patch failed. {color} |
| {color:red}-1{color} | {color:red} compile {color} | {color:red}260m 
13s{color} | {color:red} root in the patch failed. {color} |
| {color:red}-1{color} | {color:red} javac {color} | {color:red}260m 13s{color} 
| {color:red} root in the patch failed. {color} |
| {color:orange}-0{color} | {color:orange} checkstyle {color} | {color:orange}  
0m 29s{color} | {color:orange} root: The patch generated 55 new + 701 unchanged 
- 37 fixed = 756 total (was 738) {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:red}-1{color} | {color:red} javadoc {color} | {color:red}  0m 
20s{color} | {color:red} root in the patch failed. {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:red}-1{color} | {color:red} unit {color} | {color:red}211m  2s{color} 
| {color:red} root in the patch failed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
 6s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black}678m 18s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/ratis:date2018-04-12 
|
| JIRA Issue | RATIS-219 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12918701/RATIS-219.003.patch |
| Optional Tests |  asflicense  javac  javadoc  unit  findbugs  checkstyle  
compile  |
| uname | Linux 0a8310cadba5 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 
21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/home/jenkins/jenkins-slave/workspace/PreCommit-RATIS-Build/yetus-personality.sh
 |
| git revision | master / e37ab2e |
| Default Java | 1.8.0_162 |
| compile | 
https://builds.apache.org/job/PreCommit-RATIS-Build/183/artifact/out/branch-compile-root.txt
 |
| mvninstall | 
https://builds.apache.org/job/PreCommit-RATIS-Build/183/artifact/out/patch-mvninstall-root.txt
 |
| compile | 
https://builds.apache.org/job/PreCommit-RATIS-Build/183/artifact/out/patch-compile-root.txt
 |
| javac | 
https://builds.apache.org/job/PreCommit-RATIS-Build/183/artifact/out/patch-compile-root.txt
 |
| checkstyle | 
https://builds.apache.org/job/PreCommit-RATIS-Build/183/artifact/out/diff-checkstyle-root.txt
 |
| javadoc | 
https://builds.apache.org/job/PreCommit-RATIS-Build/183/artifact/out/patch-javadoc-root.txt
 |
| unit | 
https://builds.apache.org/job/PreCommit-RATIS-Build/183/artifact/out/patch-unit-root.txt
 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-RATIS-Build/183/testReport/ |
| modules | C: ratis-client ratis-server ratis-grpc U: . |
| Console output | 

[jira] [Commented] (RATIS-225) Grpc LogAppender should update next index on heartbeat reply

2018-04-12 Thread Lokesh Jain (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16435367#comment-16435367
 ] 

Lokesh Jain commented on RATIS-225:
---

This can happen during normal operation as well. Suppose the 
appendEntryRequest1 was sent. It has some 100 entries whose state machine data 
needs to be written. Now the reply for this request would be sent after all 100 
entries have been written to the state machine.

Now if another appendEntryRequest2 is sent with just one entry. This request 
might receive a reply earlier as its stateMachineData is less comparatively. 
This would happen after I changed pendingRequests from queue to a map in 
RATIS-217.

Yes, we should update match index in strict order.

> Grpc LogAppender should update next index on heartbeat reply
> 
>
> Key: RATIS-225
> URL: https://issues.apache.org/jira/browse/RATIS-225
> Project: Ratis
>  Issue Type: Improvement
>Reporter: Lokesh Jain
>Assignee: Lokesh Jain
>Priority: Major
> Attachments: RATIS-225.001.patch
>
>
> Grpc LogAppender currently does not update next index in heartbeat reply. In 
> case the previous appendEntry times out the next index may not be updated in 
> the leader for a long time. Therefore we need to update the next index on a 
> heartbeat success.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (RATIS-225) Grpc LogAppender should update next index on heartbeat reply

2018-04-12 Thread Tsz Wo Nicholas Sze (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16435316#comment-16435316
 ] 

Tsz Wo Nicholas Sze commented on RATIS-225:
---

> ... This happens because append entry reply might be out of order ...

When will this happen?  Due to timeout?

When the replies are out of order, should we not updating matchIndex (since the 
logs are not really matched)?

> Grpc LogAppender should update next index on heartbeat reply
> 
>
> Key: RATIS-225
> URL: https://issues.apache.org/jira/browse/RATIS-225
> Project: Ratis
>  Issue Type: Improvement
>Reporter: Lokesh Jain
>Assignee: Lokesh Jain
>Priority: Major
> Attachments: RATIS-225.001.patch
>
>
> Grpc LogAppender currently does not update next index in heartbeat reply. In 
> case the previous appendEntry times out the next index may not be updated in 
> the leader for a long time. Therefore we need to update the next index on a 
> heartbeat success.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (RATIS-219) Add configuration for timeout duration

2018-04-12 Thread Tsz Wo Nicholas Sze (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16435260#comment-16435260
 ] 

Tsz Wo Nicholas Sze commented on RATIS-219:
---

+1 the 003 patch looks good.

> Add configuration for timeout duration
> --
>
> Key: RATIS-219
> URL: https://issues.apache.org/jira/browse/RATIS-219
> Project: Ratis
>  Issue Type: Improvement
>Reporter: Lokesh Jain
>Assignee: Lokesh Jain
>Priority: Major
> Attachments: RATIS-219.003.patch
>
>
> We need to add configuration for setting timeout duration of requests at 
> client and server side.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (RATIS-225) Grpc LogAppender should update next index on heartbeat reply

2018-04-12 Thread Lokesh Jain (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16435239#comment-16435239
 ] 

Lokesh Jain commented on RATIS-225:
---

LogAppender#onSuccess might throw IllegalStateException in case of 
GrpcLogAppender. This happens because append entry reply might be out of order. 
The reply is sent when the state machine data is written in the follower.

> Grpc LogAppender should update next index on heartbeat reply
> 
>
> Key: RATIS-225
> URL: https://issues.apache.org/jira/browse/RATIS-225
> Project: Ratis
>  Issue Type: Improvement
>Reporter: Lokesh Jain
>Assignee: Lokesh Jain
>Priority: Major
> Attachments: RATIS-225.001.patch
>
>
> Grpc LogAppender currently does not update next index in heartbeat reply. In 
> case the previous appendEntry times out the next index may not be updated in 
> the leader for a long time. Therefore we need to update the next index on a 
> heartbeat success.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (RATIS-219) Add configuration for timeout duration

2018-04-12 Thread Lokesh Jain (JIRA)

 [ 
https://issues.apache.org/jira/browse/RATIS-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lokesh Jain updated RATIS-219:
--
Attachment: (was: RATIS-219.002.patch)

> Add configuration for timeout duration
> --
>
> Key: RATIS-219
> URL: https://issues.apache.org/jira/browse/RATIS-219
> Project: Ratis
>  Issue Type: Improvement
>Reporter: Lokesh Jain
>Assignee: Lokesh Jain
>Priority: Major
> Attachments: RATIS-219.003.patch
>
>
> We need to add configuration for setting timeout duration of requests at 
> client and server side.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (RATIS-219) Add configuration for timeout duration

2018-04-12 Thread Lokesh Jain (JIRA)

 [ 
https://issues.apache.org/jira/browse/RATIS-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lokesh Jain updated RATIS-219:
--
Attachment: RATIS-219.003.patch

> Add configuration for timeout duration
> --
>
> Key: RATIS-219
> URL: https://issues.apache.org/jira/browse/RATIS-219
> Project: Ratis
>  Issue Type: Improvement
>Reporter: Lokesh Jain
>Assignee: Lokesh Jain
>Priority: Major
> Attachments: RATIS-219.003.patch
>
>
> We need to add configuration for setting timeout duration of requests at 
> client and server side.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (RATIS-219) Add configuration for timeout duration

2018-04-12 Thread Lokesh Jain (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16435170#comment-16435170
 ] 

Lokesh Jain commented on RATIS-219:
---

[~szetszwo] Thanks for reviewing the patch! v3 patch addresses your comments.

> Add configuration for timeout duration
> --
>
> Key: RATIS-219
> URL: https://issues.apache.org/jira/browse/RATIS-219
> Project: Ratis
>  Issue Type: Improvement
>Reporter: Lokesh Jain
>Assignee: Lokesh Jain
>Priority: Major
> Attachments: RATIS-219.003.patch
>
>
> We need to add configuration for setting timeout duration of requests at 
> client and server side.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)