[jira] [Commented] (HDDS-433) ContainerStateMachine#readStateMachineData should properly build LogEntryProto

2018-09-12 Thread Hudson (JIRA)


[ 
https://issues.apache.org/jira/browse/HDDS-433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16612128#comment-16612128
 ] 

Hudson commented on HDDS-433:
-

SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #14932 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/14932/])
HDDS-433. ContainerStateMachine#readStateMachineData should properly (msingh: 
rev 47299ce23fa0f327b8c532ca96191a571c92d244)
* (edit) 
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java


> ContainerStateMachine#readStateMachineData should properly build LogEntryProto
> --
>
> Key: HDDS-433
> URL: https://issues.apache.org/jira/browse/HDDS-433
> Project: Hadoop Distributed Data Store
>  Issue Type: Bug
>  Components: Ozone Datanode
>Reporter: Lokesh Jain
>Assignee: Lokesh Jain
>Priority: Blocker
> Fix For: 0.2.1
>
> Attachments: HDDS-433.001.patch
>
>
> ContainerStateMachine#readStateMachineData returns LogEntryProto with index 
> set to 0. This leads to exception in Ratis. The LogEntryProto to return 
> should be built over the input LogEntryProto.
> The following exception was seen using Ozone, where the leader send incorrect 
> append entries to follower.
> {code}
> 2018-08-20 07:54:06,200 INFO org.apache.ratis.server.storage.RaftLogWorker: 
> Rolling segment:2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858-RaftLogWorker index 
> to:20312
> 2018-08-20 07:54:07,800 INFO org.apache.ratis.server.impl.FollowerState: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes to CANDIDATE, 
> lastRpcTime:1182, electionTimeout:990ms
> 2018-08-20 07:54:07,800 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to CANDIDATE at term 14
> for changeToCandidate
> 2018-08-20 07:54:07,801 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to FOLLOWER at term 14 
> for changeToFollower
> 2018-08-20 07:54:21,712 INFO org.apache.ratis.server.impl.FollowerState: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes to CANDIDATE, 
> lastRpcTime:2167, electionTimeout:976ms
> 2018-08-20 07:54:21,712 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to CANDIDATE at term 14
> for changeToCandidate
> 2018-08-20 07:54:21,715 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: change Leader from 
> 2bf278ca-2dad-4029-a387-2faeb10adef5_9858 to null at term 14 for ini
> tElection
> 2018-08-20 07:54:29,151 INFO org.apache.ratis.server.impl.LeaderElection: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: begin an election in Term 15
> 2018-08-20 07:54:30,735 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to FOLLOWER at term 15 
> for changeToFollower
> 2018-08-20 07:54:30,740 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: change Leader from null to 
> b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858 at term 15 for app
> endEntries
>  
> 2018-08-20 07:54:30,741 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858-org.apache.ratis.server.impl.RoleInfo@6b1e0fb8:
>  Withhold vote from candidate b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858 with 
> term 15. State: leader=b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858, term=15, 
> lastRpcElapsed=0ms
>  
> 2018-08-20 07:54:30,745 INFO org.apache.ratis.server.impl.LeaderElection: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: Election REJECTED; received 1 
> response(s) [2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858<-2
> bf278ca-2dad-4029-a387-2faeb10adef5_9858#0:FAIL-t15] and 0 exception(s); 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858:t15, 
> leader=b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858, 
> voted=2e240240-0fac-4f93-8aa8-fa8f
> 74bf1810_9858, raftlog=[(t:14, i:20374)], 
> conf=[b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858:172.26.32.231:9858, 
> 2bf278ca-2dad-4029-a387-2faeb10adef5_9858:172.26.32.230:9858, 
> 2e240240-0fac-4f93-8aa8-fa8f74bf
> 1810_9858:172.26.32.228:9858], old=null
> 2018-08-20 07:54:31,227 WARN 
> org.apache.ratis.grpc.server.RaftServerProtocolService: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: Failed appendEntries 
> b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858->2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858#1
> java.lang.IllegalStateException: Unexpected Index: previous is (t:14, 
> i:20374) but entries[0].getIndex()=0
>   

[jira] [Commented] (HDDS-433) ContainerStateMachine#readStateMachineData should properly build LogEntryProto

2018-09-12 Thread Mukul Kumar Singh (JIRA)


[ 
https://issues.apache.org/jira/browse/HDDS-433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16611687#comment-16611687
 ] 

Mukul Kumar Singh commented on HDDS-433:


Thanks for working on this [~ljain].
+1, The v1 patch looks good to me.
I think for readStateMachineData, the stateMachineDataAttached field will be 
set to true and this will be carried over to the new LogEntryProto Object as 
well.

Thanks for root causing this. I will commit this shortly.

> ContainerStateMachine#readStateMachineData should properly build LogEntryProto
> --
>
> Key: HDDS-433
> URL: https://issues.apache.org/jira/browse/HDDS-433
> Project: Hadoop Distributed Data Store
>  Issue Type: Bug
>  Components: Ozone Datanode
>Reporter: Lokesh Jain
>Assignee: Lokesh Jain
>Priority: Blocker
> Fix For: 0.2.1
>
> Attachments: HDDS-433.001.patch
>
>
> ContainerStateMachine#readStateMachineData returns LogEntryProto with index 
> set to 0. This leads to exception in Ratis. The LogEntryProto to return 
> should be built over the input LogEntryProto.
> The following exception was seen using Ozone, where the leader send incorrect 
> append entries to follower.
> {code}
> 2018-08-20 07:54:06,200 INFO org.apache.ratis.server.storage.RaftLogWorker: 
> Rolling segment:2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858-RaftLogWorker index 
> to:20312
> 2018-08-20 07:54:07,800 INFO org.apache.ratis.server.impl.FollowerState: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes to CANDIDATE, 
> lastRpcTime:1182, electionTimeout:990ms
> 2018-08-20 07:54:07,800 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to CANDIDATE at term 14
> for changeToCandidate
> 2018-08-20 07:54:07,801 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to FOLLOWER at term 14 
> for changeToFollower
> 2018-08-20 07:54:21,712 INFO org.apache.ratis.server.impl.FollowerState: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes to CANDIDATE, 
> lastRpcTime:2167, electionTimeout:976ms
> 2018-08-20 07:54:21,712 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to CANDIDATE at term 14
> for changeToCandidate
> 2018-08-20 07:54:21,715 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: change Leader from 
> 2bf278ca-2dad-4029-a387-2faeb10adef5_9858 to null at term 14 for ini
> tElection
> 2018-08-20 07:54:29,151 INFO org.apache.ratis.server.impl.LeaderElection: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: begin an election in Term 15
> 2018-08-20 07:54:30,735 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to FOLLOWER at term 15 
> for changeToFollower
> 2018-08-20 07:54:30,740 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: change Leader from null to 
> b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858 at term 15 for app
> endEntries
>  
> 2018-08-20 07:54:30,741 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858-org.apache.ratis.server.impl.RoleInfo@6b1e0fb8:
>  Withhold vote from candidate b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858 with 
> term 15. State: leader=b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858, term=15, 
> lastRpcElapsed=0ms
>  
> 2018-08-20 07:54:30,745 INFO org.apache.ratis.server.impl.LeaderElection: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: Election REJECTED; received 1 
> response(s) [2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858<-2
> bf278ca-2dad-4029-a387-2faeb10adef5_9858#0:FAIL-t15] and 0 exception(s); 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858:t15, 
> leader=b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858, 
> voted=2e240240-0fac-4f93-8aa8-fa8f
> 74bf1810_9858, raftlog=[(t:14, i:20374)], 
> conf=[b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858:172.26.32.231:9858, 
> 2bf278ca-2dad-4029-a387-2faeb10adef5_9858:172.26.32.230:9858, 
> 2e240240-0fac-4f93-8aa8-fa8f74bf
> 1810_9858:172.26.32.228:9858], old=null
> 2018-08-20 07:54:31,227 WARN 
> org.apache.ratis.grpc.server.RaftServerProtocolService: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: Failed appendEntries 
> b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858->2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858#1
> java.lang.IllegalStateException: Unexpected Index: previous is (t:14, 
> i:20374) but entries[0].getIndex()=0
> at 
> org.apache.ratis.util.Preconditions.assertTrue(Preconditions.java:60)
>   

[jira] [Commented] (HDDS-433) ContainerStateMachine#readStateMachineData should properly build LogEntryProto

2018-09-11 Thread Lokesh Jain (JIRA)


[ 
https://issues.apache.org/jira/browse/HDDS-433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16611605#comment-16611605
 ] 

Lokesh Jain commented on HDDS-433:
--

[~hanishakoneru] This case would never arrive. The readStateMachineData api is 
called only when stateMachineDataAttached is true.

> ContainerStateMachine#readStateMachineData should properly build LogEntryProto
> --
>
> Key: HDDS-433
> URL: https://issues.apache.org/jira/browse/HDDS-433
> Project: Hadoop Distributed Data Store
>  Issue Type: Bug
>  Components: Ozone Datanode
>Reporter: Lokesh Jain
>Assignee: Lokesh Jain
>Priority: Blocker
> Fix For: 0.2.1
>
> Attachments: HDDS-433.001.patch
>
>
> ContainerStateMachine#readStateMachineData returns LogEntryProto with index 
> set to 0. This leads to exception in Ratis. The LogEntryProto to return 
> should be built over the input LogEntryProto.
> The following exception was seen using Ozone, where the leader send incorrect 
> append entries to follower.
> {code}
> 2018-08-20 07:54:06,200 INFO org.apache.ratis.server.storage.RaftLogWorker: 
> Rolling segment:2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858-RaftLogWorker index 
> to:20312
> 2018-08-20 07:54:07,800 INFO org.apache.ratis.server.impl.FollowerState: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes to CANDIDATE, 
> lastRpcTime:1182, electionTimeout:990ms
> 2018-08-20 07:54:07,800 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to CANDIDATE at term 14
> for changeToCandidate
> 2018-08-20 07:54:07,801 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to FOLLOWER at term 14 
> for changeToFollower
> 2018-08-20 07:54:21,712 INFO org.apache.ratis.server.impl.FollowerState: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes to CANDIDATE, 
> lastRpcTime:2167, electionTimeout:976ms
> 2018-08-20 07:54:21,712 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to CANDIDATE at term 14
> for changeToCandidate
> 2018-08-20 07:54:21,715 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: change Leader from 
> 2bf278ca-2dad-4029-a387-2faeb10adef5_9858 to null at term 14 for ini
> tElection
> 2018-08-20 07:54:29,151 INFO org.apache.ratis.server.impl.LeaderElection: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: begin an election in Term 15
> 2018-08-20 07:54:30,735 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to FOLLOWER at term 15 
> for changeToFollower
> 2018-08-20 07:54:30,740 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: change Leader from null to 
> b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858 at term 15 for app
> endEntries
>  
> 2018-08-20 07:54:30,741 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858-org.apache.ratis.server.impl.RoleInfo@6b1e0fb8:
>  Withhold vote from candidate b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858 with 
> term 15. State: leader=b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858, term=15, 
> lastRpcElapsed=0ms
>  
> 2018-08-20 07:54:30,745 INFO org.apache.ratis.server.impl.LeaderElection: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: Election REJECTED; received 1 
> response(s) [2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858<-2
> bf278ca-2dad-4029-a387-2faeb10adef5_9858#0:FAIL-t15] and 0 exception(s); 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858:t15, 
> leader=b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858, 
> voted=2e240240-0fac-4f93-8aa8-fa8f
> 74bf1810_9858, raftlog=[(t:14, i:20374)], 
> conf=[b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858:172.26.32.231:9858, 
> 2bf278ca-2dad-4029-a387-2faeb10adef5_9858:172.26.32.230:9858, 
> 2e240240-0fac-4f93-8aa8-fa8f74bf
> 1810_9858:172.26.32.228:9858], old=null
> 2018-08-20 07:54:31,227 WARN 
> org.apache.ratis.grpc.server.RaftServerProtocolService: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: Failed appendEntries 
> b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858->2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858#1
> java.lang.IllegalStateException: Unexpected Index: previous is (t:14, 
> i:20374) but entries[0].getIndex()=0
> at 
> org.apache.ratis.util.Preconditions.assertTrue(Preconditions.java:60)
> at 
> org.apache.ratis.server.impl.RaftServerImpl.validateEntries(RaftServerImpl.java:786)
> at 
> 

[jira] [Commented] (HDDS-433) ContainerStateMachine#readStateMachineData should properly build LogEntryProto

2018-09-11 Thread Hadoop QA (JIRA)


[ 
https://issues.apache.org/jira/browse/HDDS-433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16611092#comment-16611092
 ] 

Hadoop QA commented on HDDS-433:


| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 18m 
13s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {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} trunk Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 20m 
17s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
31s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
20s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  0m 
33s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 
11m 30s{color} | {color:green} branch has no errors when building and testing 
our client artifacts. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  0m 
48s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
33s{color} | {color:green} trunk passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  0m 
31s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
24s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  0m 
24s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
14s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  0m 
28s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 
11m 38s{color} | {color:green} patch has no errors when building and testing 
our client artifacts. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  0m 
53s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
29s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  0m 
50s{color} | {color:green} container-service in the patch passed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
26s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 68m 59s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/hadoop:4b8c2b1 |
| JIRA Issue | HDDS-433 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12939290/HDDS-433.001.patch |
| Optional Tests |  asflicense  compile  javac  javadoc  mvninstall  mvnsite  
unit  shadedclient  findbugs  checkstyle  |
| uname | Linux aaba1a3d9b0a 4.4.0-133-generic #159-Ubuntu SMP Fri Aug 10 
07:31:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | /testptch/patchprocess/precommit/personality/provided.sh |
| git revision | trunk / 8ffbbf5 |
| maven | version: Apache Maven 3.3.9 |
| Default Java | 1.8.0_181 |
| findbugs | v3.1.0-RC1 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-HDDS-Build/1031/testReport/ |
| Max. process+thread count | 467 (vs. ulimit of 1) |
| modules | C: hadoop-hdds/container-service U: hadoop-hdds/container-service |
| Console output | 
https://builds.apache.org/job/PreCommit-HDDS-Build/1031/console |
| Powered by | Apache Yetus 0.8.0-SNAPSHOT   http://yetus.apache.org |


This message was automatically generated.



> ContainerStateMachine#readStateMachineData should properly build 

[jira] [Commented] (HDDS-433) ContainerStateMachine#readStateMachineData should properly build LogEntryProto

2018-09-11 Thread Hanisha Koneru (JIRA)


[ 
https://issues.apache.org/jira/browse/HDDS-433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16611091#comment-16611091
 ] 

Hanisha Koneru commented on HDDS-433:
-

{{SMLogEntryProto.newBuilder(smLogEntryProto)}} would just make sure that 
whatever field is set in {{smLogEntryProto}} is copied over to the new object. 

What if the {{stateMachineDataAttached}} field is not set in 
{{smLogEntryProto}} as that does not have any stateMachineData? If this case 
can never arise or if this field is never used in Ratis, then I think we are 
good.

> ContainerStateMachine#readStateMachineData should properly build LogEntryProto
> --
>
> Key: HDDS-433
> URL: https://issues.apache.org/jira/browse/HDDS-433
> Project: Hadoop Distributed Data Store
>  Issue Type: Bug
>  Components: Ozone Datanode
>Reporter: Lokesh Jain
>Assignee: Lokesh Jain
>Priority: Blocker
> Fix For: 0.2.1
>
> Attachments: HDDS-433.001.patch
>
>
> ContainerStateMachine#readStateMachineData returns LogEntryProto with index 
> set to 0. This leads to exception in Ratis. The LogEntryProto to return 
> should be built over the input LogEntryProto.
> The following exception was seen using Ozone, where the leader send incorrect 
> append entries to follower.
> {code}
> 2018-08-20 07:54:06,200 INFO org.apache.ratis.server.storage.RaftLogWorker: 
> Rolling segment:2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858-RaftLogWorker index 
> to:20312
> 2018-08-20 07:54:07,800 INFO org.apache.ratis.server.impl.FollowerState: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes to CANDIDATE, 
> lastRpcTime:1182, electionTimeout:990ms
> 2018-08-20 07:54:07,800 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to CANDIDATE at term 14
> for changeToCandidate
> 2018-08-20 07:54:07,801 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to FOLLOWER at term 14 
> for changeToFollower
> 2018-08-20 07:54:21,712 INFO org.apache.ratis.server.impl.FollowerState: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes to CANDIDATE, 
> lastRpcTime:2167, electionTimeout:976ms
> 2018-08-20 07:54:21,712 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to CANDIDATE at term 14
> for changeToCandidate
> 2018-08-20 07:54:21,715 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: change Leader from 
> 2bf278ca-2dad-4029-a387-2faeb10adef5_9858 to null at term 14 for ini
> tElection
> 2018-08-20 07:54:29,151 INFO org.apache.ratis.server.impl.LeaderElection: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: begin an election in Term 15
> 2018-08-20 07:54:30,735 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to FOLLOWER at term 15 
> for changeToFollower
> 2018-08-20 07:54:30,740 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: change Leader from null to 
> b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858 at term 15 for app
> endEntries
>  
> 2018-08-20 07:54:30,741 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858-org.apache.ratis.server.impl.RoleInfo@6b1e0fb8:
>  Withhold vote from candidate b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858 with 
> term 15. State: leader=b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858, term=15, 
> lastRpcElapsed=0ms
>  
> 2018-08-20 07:54:30,745 INFO org.apache.ratis.server.impl.LeaderElection: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: Election REJECTED; received 1 
> response(s) [2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858<-2
> bf278ca-2dad-4029-a387-2faeb10adef5_9858#0:FAIL-t15] and 0 exception(s); 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858:t15, 
> leader=b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858, 
> voted=2e240240-0fac-4f93-8aa8-fa8f
> 74bf1810_9858, raftlog=[(t:14, i:20374)], 
> conf=[b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858:172.26.32.231:9858, 
> 2bf278ca-2dad-4029-a387-2faeb10adef5_9858:172.26.32.230:9858, 
> 2e240240-0fac-4f93-8aa8-fa8f74bf
> 1810_9858:172.26.32.228:9858], old=null
> 2018-08-20 07:54:31,227 WARN 
> org.apache.ratis.grpc.server.RaftServerProtocolService: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: Failed appendEntries 
> b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858->2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858#1
> java.lang.IllegalStateException: Unexpected Index: previous is (t:14, 
> i:20374) but entries[0].getIndex()=0
>

[jira] [Commented] (HDDS-433) ContainerStateMachine#readStateMachineData should properly build LogEntryProto

2018-09-11 Thread Lokesh Jain (JIRA)


[ 
https://issues.apache.org/jira/browse/HDDS-433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16611077#comment-16611077
 ] 

Lokesh Jain commented on HDDS-433:
--

[~hanishakoneru] Thanks for reviewing the patch!
{code:java}
SMLogEntryProto.newBuilder(smLogEntryProto)
{code}
makes sure that all the fields of smLogEntryProto are used in the new object. 
Therefore we do not need to explicitly set it.

> ContainerStateMachine#readStateMachineData should properly build LogEntryProto
> --
>
> Key: HDDS-433
> URL: https://issues.apache.org/jira/browse/HDDS-433
> Project: Hadoop Distributed Data Store
>  Issue Type: Bug
>  Components: Ozone Datanode
>Reporter: Lokesh Jain
>Assignee: Lokesh Jain
>Priority: Blocker
> Fix For: 0.2.1
>
> Attachments: HDDS-433.001.patch
>
>
> ContainerStateMachine#readStateMachineData returns LogEntryProto with index 
> set to 0. This leads to exception in Ratis. The LogEntryProto to return 
> should be built over the input LogEntryProto.
> The following exception was seen using Ozone, where the leader send incorrect 
> append entries to follower.
> {code}
> 2018-08-20 07:54:06,200 INFO org.apache.ratis.server.storage.RaftLogWorker: 
> Rolling segment:2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858-RaftLogWorker index 
> to:20312
> 2018-08-20 07:54:07,800 INFO org.apache.ratis.server.impl.FollowerState: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes to CANDIDATE, 
> lastRpcTime:1182, electionTimeout:990ms
> 2018-08-20 07:54:07,800 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to CANDIDATE at term 14
> for changeToCandidate
> 2018-08-20 07:54:07,801 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to FOLLOWER at term 14 
> for changeToFollower
> 2018-08-20 07:54:21,712 INFO org.apache.ratis.server.impl.FollowerState: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes to CANDIDATE, 
> lastRpcTime:2167, electionTimeout:976ms
> 2018-08-20 07:54:21,712 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to CANDIDATE at term 14
> for changeToCandidate
> 2018-08-20 07:54:21,715 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: change Leader from 
> 2bf278ca-2dad-4029-a387-2faeb10adef5_9858 to null at term 14 for ini
> tElection
> 2018-08-20 07:54:29,151 INFO org.apache.ratis.server.impl.LeaderElection: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: begin an election in Term 15
> 2018-08-20 07:54:30,735 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to FOLLOWER at term 15 
> for changeToFollower
> 2018-08-20 07:54:30,740 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: change Leader from null to 
> b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858 at term 15 for app
> endEntries
>  
> 2018-08-20 07:54:30,741 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858-org.apache.ratis.server.impl.RoleInfo@6b1e0fb8:
>  Withhold vote from candidate b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858 with 
> term 15. State: leader=b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858, term=15, 
> lastRpcElapsed=0ms
>  
> 2018-08-20 07:54:30,745 INFO org.apache.ratis.server.impl.LeaderElection: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: Election REJECTED; received 1 
> response(s) [2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858<-2
> bf278ca-2dad-4029-a387-2faeb10adef5_9858#0:FAIL-t15] and 0 exception(s); 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858:t15, 
> leader=b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858, 
> voted=2e240240-0fac-4f93-8aa8-fa8f
> 74bf1810_9858, raftlog=[(t:14, i:20374)], 
> conf=[b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858:172.26.32.231:9858, 
> 2bf278ca-2dad-4029-a387-2faeb10adef5_9858:172.26.32.230:9858, 
> 2e240240-0fac-4f93-8aa8-fa8f74bf
> 1810_9858:172.26.32.228:9858], old=null
> 2018-08-20 07:54:31,227 WARN 
> org.apache.ratis.grpc.server.RaftServerProtocolService: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: Failed appendEntries 
> b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858->2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858#1
> java.lang.IllegalStateException: Unexpected Index: previous is (t:14, 
> i:20374) but entries[0].getIndex()=0
> at 
> org.apache.ratis.util.Preconditions.assertTrue(Preconditions.java:60)
> at 
> 

[jira] [Commented] (HDDS-433) ContainerStateMachine#readStateMachineData should properly build LogEntryProto

2018-09-11 Thread Hanisha Koneru (JIRA)


[ 
https://issues.apache.org/jira/browse/HDDS-433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16611048#comment-16611048
 ] 

Hanisha Koneru commented on HDDS-433:
-

Hi [~ljain], 

I see that in {{SMLogEntryProto}}, we have a \{{stateMachineDataAttached}} 
field to be set when state machine data is attached. Shouldn't we be setting 
this field to true when setting state machine data in Line 318. Unless this is 
a redundant/ deprecated field in Ratis?

> ContainerStateMachine#readStateMachineData should properly build LogEntryProto
> --
>
> Key: HDDS-433
> URL: https://issues.apache.org/jira/browse/HDDS-433
> Project: Hadoop Distributed Data Store
>  Issue Type: Bug
>  Components: Ozone Datanode
>Reporter: Lokesh Jain
>Assignee: Lokesh Jain
>Priority: Blocker
> Fix For: 0.2.1
>
> Attachments: HDDS-433.001.patch
>
>
> ContainerStateMachine#readStateMachineData returns LogEntryProto with index 
> set to 0. This leads to exception in Ratis. The LogEntryProto to return 
> should be built over the input LogEntryProto.
> The following exception was seen using Ozone, where the leader send incorrect 
> append entries to follower.
> {code}
> 2018-08-20 07:54:06,200 INFO org.apache.ratis.server.storage.RaftLogWorker: 
> Rolling segment:2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858-RaftLogWorker index 
> to:20312
> 2018-08-20 07:54:07,800 INFO org.apache.ratis.server.impl.FollowerState: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes to CANDIDATE, 
> lastRpcTime:1182, electionTimeout:990ms
> 2018-08-20 07:54:07,800 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to CANDIDATE at term 14
> for changeToCandidate
> 2018-08-20 07:54:07,801 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to FOLLOWER at term 14 
> for changeToFollower
> 2018-08-20 07:54:21,712 INFO org.apache.ratis.server.impl.FollowerState: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes to CANDIDATE, 
> lastRpcTime:2167, electionTimeout:976ms
> 2018-08-20 07:54:21,712 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to CANDIDATE at term 14
> for changeToCandidate
> 2018-08-20 07:54:21,715 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: change Leader from 
> 2bf278ca-2dad-4029-a387-2faeb10adef5_9858 to null at term 14 for ini
> tElection
> 2018-08-20 07:54:29,151 INFO org.apache.ratis.server.impl.LeaderElection: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: begin an election in Term 15
> 2018-08-20 07:54:30,735 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858 changes role from 
> org.apache.ratis.server.impl.RoleInfo@6b1e0fb8 to FOLLOWER at term 15 
> for changeToFollower
> 2018-08-20 07:54:30,740 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: change Leader from null to 
> b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858 at term 15 for app
> endEntries
>  
> 2018-08-20 07:54:30,741 INFO org.apache.ratis.server.impl.RaftServerImpl: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858-org.apache.ratis.server.impl.RoleInfo@6b1e0fb8:
>  Withhold vote from candidate b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858 with 
> term 15. State: leader=b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858, term=15, 
> lastRpcElapsed=0ms
>  
> 2018-08-20 07:54:30,745 INFO org.apache.ratis.server.impl.LeaderElection: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: Election REJECTED; received 1 
> response(s) [2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858<-2
> bf278ca-2dad-4029-a387-2faeb10adef5_9858#0:FAIL-t15] and 0 exception(s); 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858:t15, 
> leader=b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858, 
> voted=2e240240-0fac-4f93-8aa8-fa8f
> 74bf1810_9858, raftlog=[(t:14, i:20374)], 
> conf=[b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858:172.26.32.231:9858, 
> 2bf278ca-2dad-4029-a387-2faeb10adef5_9858:172.26.32.230:9858, 
> 2e240240-0fac-4f93-8aa8-fa8f74bf
> 1810_9858:172.26.32.228:9858], old=null
> 2018-08-20 07:54:31,227 WARN 
> org.apache.ratis.grpc.server.RaftServerProtocolService: 
> 2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858: Failed appendEntries 
> b6aaaf2c-2cbf-498f-995c-09cb2bb97cf4_9858->2e240240-0fac-4f93-8aa8-fa8f74bf1810_9858#1
> java.lang.IllegalStateException: Unexpected Index: previous is (t:14, 
> i:20374) but entries[0].getIndex()=0
> at 
> org.apache.ratis.util.Preconditions.assertTrue(Preconditions.java:60)
> at