[jira] [Commented] (RATIS-337) In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without proper null check

2018-10-06 Thread Tsz Wo Nicholas Sze (JIRA)


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

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

r337_20181007.patch: updated with trunk. 

> In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without 
> proper null check
> -
>
> Key: RATIS-337
> URL: https://issues.apache.org/jira/browse/RATIS-337
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Reporter: Tsz Wo Nicholas Sze
>Assignee: Tsz Wo Nicholas Sze
>Priority: Major
> Attachments: r337_20181007.patch
>
>
> leaderState/heartbeatMonitor is declared as volatile. Some code like below 
> won't work since leaderState may be set to null in between.
> {code:java}
> //RaftServerImpl.checkLeaderState(..)
> } else if (leaderState == null || !leaderState.isReady()) {
> {code}



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


[jira] [Updated] (RATIS-337) In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without proper null check

2018-10-06 Thread Tsz Wo Nicholas Sze (JIRA)


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

Tsz Wo Nicholas Sze updated RATIS-337:
--
Attachment: (was: r337_20181006b.patch)

> In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without 
> proper null check
> -
>
> Key: RATIS-337
> URL: https://issues.apache.org/jira/browse/RATIS-337
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Reporter: Tsz Wo Nicholas Sze
>Assignee: Tsz Wo Nicholas Sze
>Priority: Major
> Attachments: r337_20181007.patch
>
>
> leaderState/heartbeatMonitor is declared as volatile. Some code like below 
> won't work since leaderState may be set to null in between.
> {code:java}
> //RaftServerImpl.checkLeaderState(..)
> } else if (leaderState == null || !leaderState.isReady()) {
> {code}



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


[jira] [Updated] (RATIS-337) In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without proper null check

2018-10-06 Thread Tsz Wo Nicholas Sze (JIRA)


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

Tsz Wo Nicholas Sze updated RATIS-337:
--
Attachment: r337_20181007.patch

> In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without 
> proper null check
> -
>
> Key: RATIS-337
> URL: https://issues.apache.org/jira/browse/RATIS-337
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Reporter: Tsz Wo Nicholas Sze
>Assignee: Tsz Wo Nicholas Sze
>Priority: Major
> Attachments: r337_20181007.patch
>
>
> leaderState/heartbeatMonitor is declared as volatile. Some code like below 
> won't work since leaderState may be set to null in between.
> {code:java}
> //RaftServerImpl.checkLeaderState(..)
> } else if (leaderState == null || !leaderState.isReady()) {
> {code}



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


[jira] [Updated] (RATIS-341) Raft log index on the follower should be applied to state machine only after writing the log

2018-10-06 Thread Tsz Wo Nicholas Sze (JIRA)


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

Tsz Wo Nicholas Sze updated RATIS-341:
--
Attachment: RATIS-341.003_committed.patch

> Raft log index on the follower should be applied to state machine only after 
> writing the log
> 
>
> Key: RATIS-341
> URL: https://issues.apache.org/jira/browse/RATIS-341
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Affects Versions: 0.3.0
>Reporter: Mukul Kumar Singh
>Assignee: Mukul Kumar Singh
>Priority: Major
> Fix For: 0.3.0
>
> Attachments: RATIS-341.003.patch, RATIS-341.003_committed.patch
>
>
> In follower, RaftServerImpl#appendEntriesAsync, entries should only be 
> applied to state machine
> only after writing the log to the state machine.



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


[jira] [Commented] (RATIS-341) Raft log index on the follower should be applied to state machine only after writing the log

2018-10-06 Thread Tsz Wo Nicholas Sze (JIRA)


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

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

+1 the 003 patch looks good except that the logAppendEntries(..) should be 
called outside the synchronized-block and some indentations are off.

I will fix them when committing the patch.

> Raft log index on the follower should be applied to state machine only after 
> writing the log
> 
>
> Key: RATIS-341
> URL: https://issues.apache.org/jira/browse/RATIS-341
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Affects Versions: 0.3.0
>Reporter: Mukul Kumar Singh
>Assignee: Mukul Kumar Singh
>Priority: Major
> Fix For: 0.3.0
>
> Attachments: RATIS-341.003.patch
>
>
> In follower, RaftServerImpl#appendEntriesAsync, entries should only be 
> applied to state machine
> only after writing the log to the state machine.



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


[jira] [Commented] (RATIS-274) Read/Write-path of log stream state machine

2018-10-06 Thread Ted Yu (JIRA)


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

Ted Yu commented on RATIS-274:
--

{code}
+  LogStream createLog(LogName name, LogServiceConfiguration config);
{code}
The single parameter createLog throws exception. Should the above method throw 
exception as well ?
{code}
+   * @return
*/
-  void removeRecordListener(LogName name, RecordListener listener);
+  boolean removeRecordListener(LogName name, RecordListener listener);
{code}
What does the return value represent ?

For LogServiceConfiguration#set, Map#put returns:
the previous value associated with key, or null if there was no mapping for key

It would be good to align the set with Map#put in terms of return value.
{code}
+try {
+  log.close();
+  close();
+} catch (IOException e) {
{code}
If log.close throws exception, wouldn't close() call be skipped ?



> Read/Write-path of log stream state machine
> ---
>
> Key: RATIS-274
> URL: https://issues.apache.org/jira/browse/RATIS-274
> Project: Ratis
>  Issue Type: Sub-task
>  Components: LogService
>Reporter: Josh Elser
>Assignee: Vladimir Rodionov
>Priority: Major
> Attachments: RATIS-274-v1.patch
>
>
> Implement the ability to read/write data to a log stream.



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


[jira] [Commented] (RATIS-341) Raft log index on the follower should be applied to state machine only after writing the log

2018-10-06 Thread Hadoop QA (JIRA)


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

Hadoop QA commented on RATIS-341:
-

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m 
17s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  0m  
0s{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 
13s{color} | {color:blue} Maven dependency ordering for branch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  0m 
44s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
40s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
24s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
27s{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:green}+1{color} | {color:green} mvninstall {color} | {color:green}  0m 
44s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
38s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} cc {color} | {color:green}  0m 
38s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  0m 
38s{color} | {color:green} the patch passed {color} |
| {color:orange}-0{color} | {color:orange} checkstyle {color} | {color:orange}  
0m 24s{color} | {color:orange} root: The patch generated 10 new + 807 unchanged 
- 6 fixed = 817 total (was 813) {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} javadoc {color} | {color:green}  0m 
27s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:red}-1{color} | {color:red} unit {color} | {color:red}  6m 50s{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} 12m 10s{color} | 
{color:black} {color} |
\\
\\
|| Reason || Tests ||
| Failed junit tests | ratis.server.simulation.TestRaftWithSimulatedRpc |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/ratis:date2018-10-06 
|
| JIRA Issue | RATIS-341 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12942684/RATIS-341.003.patch |
| Optional Tests |  asflicense  javac  javadoc  unit  findbugs  checkstyle  
compile  cc  |
| uname | Linux 206c8e3d4553 3.13.0-143-generic #192-Ubuntu SMP Tue Feb 27 
10:45:36 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 / b0dc992 |
| Default Java | 1.8.0_181 |
| checkstyle | 
https://builds.apache.org/job/PreCommit-RATIS-Build/381/artifact/out/diff-checkstyle-root.txt
 |
| unit | 
https://builds.apache.org/job/PreCommit-RATIS-Build/381/artifact/out/patch-unit-root.txt
 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-RATIS-Build/381/testReport/ |
| modules | C: ratis-proto ratis-server ratis-grpc U: . |
| Console output | 
https://builds.apache.org/job/PreCommit-RATIS-Build/381/console |
| Powered by | Apache Yetus 0.5.0   http://yetus.apache.org |


This message was automatically generated.



> Raft log index on the follower should be applied to state machine only after 
> writing the log
> 

[jira] [Updated] (RATIS-341) Raft log index on the follower should be applied to state machine only after writing the log

2018-10-06 Thread Mukul Kumar Singh (JIRA)


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

Mukul Kumar Singh updated RATIS-341:

Attachment: (was: RATIS-341.002.patch)

> Raft log index on the follower should be applied to state machine only after 
> writing the log
> 
>
> Key: RATIS-341
> URL: https://issues.apache.org/jira/browse/RATIS-341
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Affects Versions: 0.3.0
>Reporter: Mukul Kumar Singh
>Assignee: Mukul Kumar Singh
>Priority: Major
> Fix For: 0.3.0
>
> Attachments: RATIS-341.003.patch
>
>
> In follower, RaftServerImpl#appendEntriesAsync, entries should only be 
> applied to state machine
> only after writing the log to the state machine.



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


[jira] [Updated] (RATIS-341) Raft log index on the follower should be applied to state machine only after writing the log

2018-10-06 Thread Mukul Kumar Singh (JIRA)


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

Mukul Kumar Singh updated RATIS-341:

Attachment: RATIS-341.003.patch

> Raft log index on the follower should be applied to state machine only after 
> writing the log
> 
>
> Key: RATIS-341
> URL: https://issues.apache.org/jira/browse/RATIS-341
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Affects Versions: 0.3.0
>Reporter: Mukul Kumar Singh
>Assignee: Mukul Kumar Singh
>Priority: Major
> Fix For: 0.3.0
>
> Attachments: RATIS-341.003.patch
>
>
> In follower, RaftServerImpl#appendEntriesAsync, entries should only be 
> applied to state machine
> only after writing the log to the state machine.



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


[jira] [Commented] (RATIS-341) Raft log index on the follower should be applied to state machine only after writing the log

2018-10-06 Thread Mukul Kumar Singh (JIRA)


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

Mukul Kumar Singh commented on RATIS-341:
-

Thanks for the review [~szetszwo]. Patch  v3 fixes the review comments.

> Raft log index on the follower should be applied to state machine only after 
> writing the log
> 
>
> Key: RATIS-341
> URL: https://issues.apache.org/jira/browse/RATIS-341
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Affects Versions: 0.3.0
>Reporter: Mukul Kumar Singh
>Assignee: Mukul Kumar Singh
>Priority: Major
> Fix For: 0.3.0
>
> Attachments: RATIS-341.003.patch
>
>
> In follower, RaftServerImpl#appendEntriesAsync, entries should only be 
> applied to state machine
> only after writing the log to the state machine.



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


[jira] [Commented] (RATIS-337) In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without proper null check

2018-10-06 Thread Hadoop QA (JIRA)


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

Hadoop QA commented on RATIS-337:
-

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m  
9s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  0m  
0s{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:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 1 new or modified test 
files. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  0m 
56s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
39s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
21s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
28s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:red}-1{color} | {color:red} mvninstall {color} | {color:red}  0m 
18s{color} | {color:red} root in the patch failed. {color} |
| {color:red}-1{color} | {color:red} compile {color} | {color:red}  0m 
18s{color} | {color:red} root in the patch failed. {color} |
| {color:red}-1{color} | {color:red} javac {color} | {color:red}  0m 17s{color} 
| {color:red} root in the patch failed. {color} |
| {color:orange}-0{color} | {color:orange} checkstyle {color} | {color:orange}  
0m 15s{color} | {color:orange} root: The patch generated 47 new + 153 unchanged 
- 345 fixed = 200 total (was 498) {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 
15s{color} | {color:red} root in the patch failed. {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:red}-1{color} | {color:red} unit {color} | {color:red}  0m 23s{color} 
| {color:red} root in the patch failed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
 5s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black}  4m 16s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/ratis:date2018-10-06 
|
| JIRA Issue | RATIS-337 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12942675/r337_20181006b.patch |
| Optional Tests |  asflicense  javac  javadoc  unit  findbugs  checkstyle  
compile  |
| uname | Linux f09c1e9f739b 3.13.0-153-generic #203-Ubuntu SMP Thu Jun 14 
08:52:28 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 / b0dc992 |
| Default Java | 1.8.0_181 |
| mvninstall | 
https://builds.apache.org/job/PreCommit-RATIS-Build/380/artifact/out/patch-mvninstall-root.txt
 |
| compile | 
https://builds.apache.org/job/PreCommit-RATIS-Build/380/artifact/out/patch-compile-root.txt
 |
| javac | 
https://builds.apache.org/job/PreCommit-RATIS-Build/380/artifact/out/patch-compile-root.txt
 |
| checkstyle | 
https://builds.apache.org/job/PreCommit-RATIS-Build/380/artifact/out/diff-checkstyle-root.txt
 |
| javadoc | 
https://builds.apache.org/job/PreCommit-RATIS-Build/380/artifact/out/patch-javadoc-root.txt
 |
| unit | 
https://builds.apache.org/job/PreCommit-RATIS-Build/380/artifact/out/patch-unit-root.txt
 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-RATIS-Build/380/testReport/ |
| modules | C: ratis-server U: ratis-server |
| Console output | 
https://builds.apache.org/job/PreCommit-RATIS-Build/380/console |
| Powered by | Apache Yetus 0.5.0   http://yetus.apache.org |


This message was automatically generated.



> In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without 
> proper null check
> -
>
> Key: RATIS-337
> URL: https://issues.apache.org/jira/browse/RATIS-337
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>

[jira] [Commented] (RATIS-337) In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without proper null check

2018-10-06 Thread Tsz Wo Nicholas Sze (JIRA)


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

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

Oops, the last patch does not compile.

r337_20181006b.patch: removes an extra character.


> In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without 
> proper null check
> -
>
> Key: RATIS-337
> URL: https://issues.apache.org/jira/browse/RATIS-337
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Reporter: Tsz Wo Nicholas Sze
>Assignee: Tsz Wo Nicholas Sze
>Priority: Major
> Attachments: r337_20181006b.patch
>
>
> leaderState/heartbeatMonitor is declared as volatile. Some code like below 
> won't work since leaderState may be set to null in between.
> {code:java}
> //RaftServerImpl.checkLeaderState(..)
> } else if (leaderState == null || !leaderState.isReady()) {
> {code}



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


[jira] [Updated] (RATIS-337) In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without proper null check

2018-10-06 Thread Tsz Wo Nicholas Sze (JIRA)


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

Tsz Wo Nicholas Sze updated RATIS-337:
--
Attachment: r337_20181006b.patch

> In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without 
> proper null check
> -
>
> Key: RATIS-337
> URL: https://issues.apache.org/jira/browse/RATIS-337
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Reporter: Tsz Wo Nicholas Sze
>Assignee: Tsz Wo Nicholas Sze
>Priority: Major
> Attachments: r337_20181006b.patch
>
>
> leaderState/heartbeatMonitor is declared as volatile. Some code like below 
> won't work since leaderState may be set to null in between.
> {code:java}
> //RaftServerImpl.checkLeaderState(..)
> } else if (leaderState == null || !leaderState.isReady()) {
> {code}



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


[jira] [Updated] (RATIS-337) In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without proper null check

2018-10-06 Thread Tsz Wo Nicholas Sze (JIRA)


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

Tsz Wo Nicholas Sze updated RATIS-337:
--
Attachment: (was: r337_20181006.patch)

> In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without 
> proper null check
> -
>
> Key: RATIS-337
> URL: https://issues.apache.org/jira/browse/RATIS-337
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Reporter: Tsz Wo Nicholas Sze
>Assignee: Tsz Wo Nicholas Sze
>Priority: Major
> Attachments: r337_20181006b.patch
>
>
> leaderState/heartbeatMonitor is declared as volatile. Some code like below 
> won't work since leaderState may be set to null in between.
> {code:java}
> //RaftServerImpl.checkLeaderState(..)
> } else if (leaderState == null || !leaderState.isReady()) {
> {code}



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


[jira] [Commented] (RATIS-337) In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without proper null check

2018-10-06 Thread Hadoop QA (JIRA)


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

Hadoop QA commented on RATIS-337:
-

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m  
9s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  0m  
1s{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:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 1 new or modified test 
files. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  0m 
43s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
40s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
20s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
27s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:red}-1{color} | {color:red} mvninstall {color} | {color:red}  0m 
18s{color} | {color:red} root in the patch failed. {color} |
| {color:red}-1{color} | {color:red} compile {color} | {color:red}  0m 
17s{color} | {color:red} root in the patch failed. {color} |
| {color:red}-1{color} | {color:red} javac {color} | {color:red}  0m 17s{color} 
| {color:red} root in the patch failed. {color} |
| {color:orange}-0{color} | {color:orange} checkstyle {color} | {color:orange}  
0m 16s{color} | {color:orange} root: The patch generated 47 new + 153 unchanged 
- 345 fixed = 200 total (was 498) {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 
14s{color} | {color:red} root in the patch failed. {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:red}-1{color} | {color:red} unit {color} | {color:red}  0m 24s{color} 
| {color:red} root in the patch failed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
 4s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black}  4m  2s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/ratis:date2018-10-06 
|
| JIRA Issue | RATIS-337 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12942674/r337_20181006.patch |
| Optional Tests |  asflicense  javac  javadoc  unit  findbugs  checkstyle  
compile  |
| uname | Linux ade59f55607e 3.13.0-153-generic #203-Ubuntu SMP Thu Jun 14 
08:52:28 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 / b0dc992 |
| Default Java | 1.8.0_181 |
| mvninstall | 
https://builds.apache.org/job/PreCommit-RATIS-Build/379/artifact/out/patch-mvninstall-root.txt
 |
| compile | 
https://builds.apache.org/job/PreCommit-RATIS-Build/379/artifact/out/patch-compile-root.txt
 |
| javac | 
https://builds.apache.org/job/PreCommit-RATIS-Build/379/artifact/out/patch-compile-root.txt
 |
| checkstyle | 
https://builds.apache.org/job/PreCommit-RATIS-Build/379/artifact/out/diff-checkstyle-root.txt
 |
| javadoc | 
https://builds.apache.org/job/PreCommit-RATIS-Build/379/artifact/out/patch-javadoc-root.txt
 |
| unit | 
https://builds.apache.org/job/PreCommit-RATIS-Build/379/artifact/out/patch-unit-root.txt
 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-RATIS-Build/379/testReport/ |
| modules | C: ratis-server U: ratis-server |
| Console output | 
https://builds.apache.org/job/PreCommit-RATIS-Build/379/console |
| Powered by | Apache Yetus 0.5.0   http://yetus.apache.org |


This message was automatically generated.



> In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without 
> proper null check
> -
>
> Key: RATIS-337
> URL: https://issues.apache.org/jira/browse/RATIS-337
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>

[jira] [Updated] (RATIS-337) In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without proper null check

2018-10-06 Thread Tsz Wo Nicholas Sze (JIRA)


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

Tsz Wo Nicholas Sze updated RATIS-337:
--
Attachment: r337_20181006.patch

> In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without 
> proper null check
> -
>
> Key: RATIS-337
> URL: https://issues.apache.org/jira/browse/RATIS-337
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Reporter: Tsz Wo Nicholas Sze
>Assignee: Tsz Wo Nicholas Sze
>Priority: Major
> Attachments: r337_20181006.patch
>
>
> leaderState/heartbeatMonitor is declared as volatile. Some code like below 
> won't work since leaderState may be set to null in between.
> {code:java}
> //RaftServerImpl.checkLeaderState(..)
> } else if (leaderState == null || !leaderState.isReady()) {
> {code}



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


[jira] [Commented] (RATIS-337) In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without proper null check

2018-10-06 Thread Tsz Wo Nicholas Sze (JIRA)


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

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

r337_20181006.patch: fixes some bugs.

> In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without 
> proper null check
> -
>
> Key: RATIS-337
> URL: https://issues.apache.org/jira/browse/RATIS-337
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Reporter: Tsz Wo Nicholas Sze
>Assignee: Tsz Wo Nicholas Sze
>Priority: Major
> Attachments: r337_20181006.patch
>
>
> leaderState/heartbeatMonitor is declared as volatile. Some code like below 
> won't work since leaderState may be set to null in between.
> {code:java}
> //RaftServerImpl.checkLeaderState(..)
> } else if (leaderState == null || !leaderState.isReady()) {
> {code}



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


[jira] [Updated] (RATIS-337) In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without proper null check

2018-10-06 Thread Tsz Wo Nicholas Sze (JIRA)


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

Tsz Wo Nicholas Sze updated RATIS-337:
--
Attachment: (was: r337_20181006.patch)

> In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without 
> proper null check
> -
>
> Key: RATIS-337
> URL: https://issues.apache.org/jira/browse/RATIS-337
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Reporter: Tsz Wo Nicholas Sze
>Assignee: Tsz Wo Nicholas Sze
>Priority: Major
>
> leaderState/heartbeatMonitor is declared as volatile. Some code like below 
> won't work since leaderState may be set to null in between.
> {code:java}
> //RaftServerImpl.checkLeaderState(..)
> } else if (leaderState == null || !leaderState.isReady()) {
> {code}



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


[jira] [Updated] (RATIS-337) In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without proper null check

2018-10-06 Thread Tsz Wo Nicholas Sze (JIRA)


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

Tsz Wo Nicholas Sze updated RATIS-337:
--
Attachment: (was: r337_20181002.patch)

> In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without 
> proper null check
> -
>
> Key: RATIS-337
> URL: https://issues.apache.org/jira/browse/RATIS-337
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Reporter: Tsz Wo Nicholas Sze
>Assignee: Tsz Wo Nicholas Sze
>Priority: Major
> Attachments: r337_20181006.patch
>
>
> leaderState/heartbeatMonitor is declared as volatile. Some code like below 
> won't work since leaderState may be set to null in between.
> {code:java}
> //RaftServerImpl.checkLeaderState(..)
> } else if (leaderState == null || !leaderState.isReady()) {
> {code}



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


[jira] [Updated] (RATIS-337) In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without proper null check

2018-10-06 Thread Tsz Wo Nicholas Sze (JIRA)


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

Tsz Wo Nicholas Sze updated RATIS-337:
--
Attachment: r337_20181006.patch

> In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without 
> proper null check
> -
>
> Key: RATIS-337
> URL: https://issues.apache.org/jira/browse/RATIS-337
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Reporter: Tsz Wo Nicholas Sze
>Assignee: Tsz Wo Nicholas Sze
>Priority: Major
> Attachments: r337_20181006.patch
>
>
> leaderState/heartbeatMonitor is declared as volatile. Some code like below 
> won't work since leaderState may be set to null in between.
> {code:java}
> //RaftServerImpl.checkLeaderState(..)
> } else if (leaderState == null || !leaderState.isReady()) {
> {code}



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


[jira] [Commented] (RATIS-341) Raft log index on the follower should be applied to state machine only after writing the log

2018-10-06 Thread Tsz Wo Nicholas Sze (JIRA)


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

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

>  ..., why do we need to change LeaderState?

In the Raft protocol, leader should send the leader commit index to followers 
so that we should not change LeaderState.  However, I agree that if a follower 
does not have the log flushed, the follower should not update the commit index. 
 Otherwise, it will violate the invariant
{code}
flushedIndex >= commitIndex
{code}
How about changing RaftLog as below?
{code}
@@ -94,8 +94,9 @@ public abstract class RaftLog implements Closeable {
 // paper for details.
 final TermIndex entry = getTermIndex(majorityIndex);
 if (entry != null && entry.getTerm() == currentTerm) {
-  LOG.debug("{}: Updating lastCommitted to {}", selfId, majorityIndex);
-  lastCommitted.set(majorityIndex);
+  final long commitIndex = Math.min(majorityIndex, 
getLatestFlushedIndex());
+  LOG.debug("{}: Updating lastCommitted to {}", selfId, commitIndex);
+  lastCommitted.set(commitIndex);
   return true;
 }
   }
{code}


> Raft log index on the follower should be applied to state machine only after 
> writing the log
> 
>
> Key: RATIS-341
> URL: https://issues.apache.org/jira/browse/RATIS-341
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Affects Versions: 0.3.0
>Reporter: Mukul Kumar Singh
>Assignee: Mukul Kumar Singh
>Priority: Major
> Fix For: 0.3.0
>
> Attachments: RATIS-341.002.patch
>
>
> In follower, RaftServerImpl#appendEntriesAsync, entries should only be 
> applied to state machine
> only after writing the log to the state machine.



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


[jira] [Commented] (RATIS-341) Raft log index on the follower should be applied to state machine only after writing the log

2018-10-06 Thread Mukul Kumar Singh (JIRA)


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

Mukul Kumar Singh commented on RATIS-341:
-

Thanks for the review [~szetszwo]. The changes in leader state are needed for a 
slow follower.

For a slow node which is catching up, the commit index send along with the 
append request can be beyond the log indexes sent to the follower.


> Raft log index on the follower should be applied to state machine only after 
> writing the log
> 
>
> Key: RATIS-341
> URL: https://issues.apache.org/jira/browse/RATIS-341
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Affects Versions: 0.3.0
>Reporter: Mukul Kumar Singh
>Assignee: Mukul Kumar Singh
>Priority: Major
> Fix For: 0.3.0
>
> Attachments: RATIS-341.002.patch
>
>
> In follower, RaftServerImpl#appendEntriesAsync, entries should only be 
> applied to state machine
> only after writing the log to the state machine.



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


[jira] [Commented] (RATIS-262) Fix compilation warning and deprecated api usage

2018-10-06 Thread Hadoop QA (JIRA)


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

Hadoop QA commented on RATIS-262:
-

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  1m 
20s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  0m  
0s{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:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 3 new or modified test 
files. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
15s{color} | {color:blue} Maven dependency ordering for branch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  0m 
45s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
38s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
19s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
27s{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:green}+1{color} | {color:green} mvninstall {color} | {color:green}  0m 
43s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
38s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  0m 
38s{color} | {color:green} root generated 0 new + 0 unchanged - 92 fixed = 0 
total (was 92) {color} |
| {color:orange}-0{color} | {color:orange} checkstyle {color} | {color:orange}  
0m 18s{color} | {color:orange} root: The patch generated 4 new + 418 unchanged 
- 1 fixed = 422 total (was 419) {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} xml {color} | {color:green}  0m  
2s{color} | {color:green} The patch has no ill-formed XML file. {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
27s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:red}-1{color} | {color:red} unit {color} | {color:red}  6m 55s{color} 
| {color:red} root in the patch failed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
 7s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 13m 10s{color} | 
{color:black} {color} |
\\
\\
|| Reason || Tests ||
| Failed junit tests | 
ratis.server.simulation.TestRaftReconfigurationWithSimulatedRpc |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/ratis:date2018-10-06 
|
| JIRA Issue | RATIS-262 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12942666/r262_20181006.patch |
| Optional Tests |  asflicense  javac  javadoc  unit  xml  compile  findbugs  
checkstyle  |
| uname | Linux eb70a8dd8029 3.13.0-139-generic #188-Ubuntu SMP Tue Jan 9 
14:43:09 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 / b0dc992 |
| Default Java | 1.8.0_181 |
| checkstyle | 
https://builds.apache.org/job/PreCommit-RATIS-Build/378/artifact/out/diff-checkstyle-root.txt
 |
| unit | 
https://builds.apache.org/job/PreCommit-RATIS-Build/378/artifact/out/patch-unit-root.txt
 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-RATIS-Build/378/testReport/ |
| modules | C: ratis-common ratis-server ratis-grpc ratis-hadoop ratis-examples 
. U: . |
| Console output | 
https://builds.apache.org/job/PreCommit-RATIS-Build/378/console |
| Powered by | Apache Yetus 0.5.0   http://yetus.apache.org |


This message was automatically generated.



> Fix compilation warning and deprecated api usage
> 
>
> Key: RATIS-262
> URL: 

[jira] [Commented] (RATIS-341) Raft log index on the follower should be applied to state machine only after writing the log

2018-10-06 Thread Tsz Wo Nicholas Sze (JIRA)


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

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

The change in RaftServerImpl looks good.  However, why do we need to change 
LeaderState?

> Raft log index on the follower should be applied to state machine only after 
> writing the log
> 
>
> Key: RATIS-341
> URL: https://issues.apache.org/jira/browse/RATIS-341
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Affects Versions: 0.3.0
>Reporter: Mukul Kumar Singh
>Assignee: Mukul Kumar Singh
>Priority: Major
> Fix For: 0.3.0
>
> Attachments: RATIS-341.002.patch
>
>
> In follower, RaftServerImpl#appendEntriesAsync, entries should only be 
> applied to state machine
> only after writing the log to the state machine.



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


[jira] [Commented] (RATIS-337) In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without proper null check

2018-10-06 Thread Hadoop QA (JIRA)


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

Hadoop QA commented on RATIS-337:
-

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m 
10s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  0m  
0s{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:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 1 new or modified test 
files. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  0m 
54s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
42s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
19s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
28s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  0m 
46s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
40s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  0m 
40s{color} | {color:green} the patch passed {color} |
| {color:orange}-0{color} | {color:orange} checkstyle {color} | {color:orange}  
0m 21s{color} | {color:orange} root: The patch generated 61 new + 468 unchanged 
- 30 fixed = 529 total (was 498) {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} javadoc {color} | {color:green}  0m 
28s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:red}-1{color} | {color:red} unit {color} | {color:red}  7m  9s{color} 
| {color:red} root in the patch failed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
 7s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 12m 14s{color} | 
{color:black} {color} |
\\
\\
|| Reason || Tests ||
| Failed junit tests | 
ratis.server.simulation.TestRaftReconfigurationWithSimulatedRpc |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/ratis:date2018-10-06 
|
| JIRA Issue | RATIS-337 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12942185/r337_20181002.patch |
| Optional Tests |  asflicense  javac  javadoc  unit  findbugs  checkstyle  
compile  |
| uname | Linux a7701a23e591 3.13.0-153-generic #203-Ubuntu SMP Thu Jun 14 
08:52:28 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 / b0dc992 |
| Default Java | 1.8.0_181 |
| checkstyle | 
https://builds.apache.org/job/PreCommit-RATIS-Build/377/artifact/out/diff-checkstyle-root.txt
 |
| unit | 
https://builds.apache.org/job/PreCommit-RATIS-Build/377/artifact/out/patch-unit-root.txt
 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-RATIS-Build/377/testReport/ |
| modules | C: ratis-server U: ratis-server |
| Console output | 
https://builds.apache.org/job/PreCommit-RATIS-Build/377/console |
| Powered by | Apache Yetus 0.5.0   http://yetus.apache.org |


This message was automatically generated.



> In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without 
> proper null check
> -
>
> Key: RATIS-337
> URL: https://issues.apache.org/jira/browse/RATIS-337
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Reporter: Tsz Wo Nicholas Sze
>Assignee: Tsz Wo Nicholas Sze
>Priority: Major
> Attachments: r337_20181002.patch
>
>
> leaderState/heartbeatMonitor is declared as volatile. Some code like below 
> won't work since leaderState may be set to null in between.
> {code:java}
> 

[jira] [Commented] (RATIS-262) Fix compilation warning and deprecated api usage

2018-10-06 Thread Tsz Wo Nicholas Sze (JIRA)


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

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

r262_20181006.patch: fix/suppress warnings.

There should be no more warnings shown after the patch.

> Fix compilation warning and deprecated api usage
> 
>
> Key: RATIS-262
> URL: https://issues.apache.org/jira/browse/RATIS-262
> Project: Ratis
>  Issue Type: Bug
>  Components: build
>Reporter: Elek, Marton
>Priority: Minor
> Attachments: r262_20181006.patch
>
>
> During the 0.2.0-rc2 vote [~khmarbaise] wrote the following comment:
> {quote}
> so far so good and got several messages about deprecated calls and things 
> like this: 
>  
> INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ 
> ratis-server --- 
> [INFO] Compiling 55 source files to 
> /Users/kama/Downloads/ratis-incubating-0.2.0/ratis-server/target/classes 
> [WARNING] 
> /Users/kama/Downloads/ratis-incubating-0.2.0/ratis-server/src/main/java/org/apache/ratis/server/storage/MemoryRaftLog.java:[48,26]
>  [try] auto-closeable resource readLock is never referenced in body of 
> corresponding try statement 
> [WARNING] 
> /Users/kama/Downloads/ratis-incubating-0.2.0/ratis-server/src/main/java/org/apache/ratis/server/storage/MemoryRaftLog.java:[57,26]
>  [try] auto-closeable resource readLock is never referenced in body of 
> corresponding try statement 
> [WARNING] 
> /Users/kama/Downloads/ratis-incubating-0.2.0/ratis-server/src/main/java/org/apache/ratis/server/storage/MemoryRaftLog.java:[67,26]
>  [try] auto-closeable resource readLock is never referenced in body of 
> corresponding try statement 
> [WARNING] 
> /Users/kama/Downloads/ratis-incubating-0.2.0/ratis-server/src/main/java/org/apache/ratis/server/storage/MemoryRaftLog.java:[85,26]
>  [try] auto-closeable resource writeLock is never referenced in body of 
> corresponding try statement 
>  
> which are not really a problem...can be fixed in the next release... 
> {quote}
> Would be great to fix them long-term.



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


[jira] [Assigned] (RATIS-262) Fix compilation warning and deprecated api usage

2018-10-06 Thread Tsz Wo Nicholas Sze (JIRA)


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

Tsz Wo Nicholas Sze reassigned RATIS-262:
-

Assignee: Tsz Wo Nicholas Sze

> Fix compilation warning and deprecated api usage
> 
>
> Key: RATIS-262
> URL: https://issues.apache.org/jira/browse/RATIS-262
> Project: Ratis
>  Issue Type: Bug
>  Components: build
>Reporter: Elek, Marton
>Assignee: Tsz Wo Nicholas Sze
>Priority: Minor
> Attachments: r262_20181006.patch
>
>
> During the 0.2.0-rc2 vote [~khmarbaise] wrote the following comment:
> {quote}
> so far so good and got several messages about deprecated calls and things 
> like this: 
>  
> INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ 
> ratis-server --- 
> [INFO] Compiling 55 source files to 
> /Users/kama/Downloads/ratis-incubating-0.2.0/ratis-server/target/classes 
> [WARNING] 
> /Users/kama/Downloads/ratis-incubating-0.2.0/ratis-server/src/main/java/org/apache/ratis/server/storage/MemoryRaftLog.java:[48,26]
>  [try] auto-closeable resource readLock is never referenced in body of 
> corresponding try statement 
> [WARNING] 
> /Users/kama/Downloads/ratis-incubating-0.2.0/ratis-server/src/main/java/org/apache/ratis/server/storage/MemoryRaftLog.java:[57,26]
>  [try] auto-closeable resource readLock is never referenced in body of 
> corresponding try statement 
> [WARNING] 
> /Users/kama/Downloads/ratis-incubating-0.2.0/ratis-server/src/main/java/org/apache/ratis/server/storage/MemoryRaftLog.java:[67,26]
>  [try] auto-closeable resource readLock is never referenced in body of 
> corresponding try statement 
> [WARNING] 
> /Users/kama/Downloads/ratis-incubating-0.2.0/ratis-server/src/main/java/org/apache/ratis/server/storage/MemoryRaftLog.java:[85,26]
>  [try] auto-closeable resource writeLock is never referenced in body of 
> corresponding try statement 
>  
> which are not really a problem...can be fixed in the next release... 
> {quote}
> Would be great to fix them long-term.



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


[jira] [Updated] (RATIS-262) Fix compilation warning and deprecated api usage

2018-10-06 Thread Tsz Wo Nicholas Sze (JIRA)


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

Tsz Wo Nicholas Sze updated RATIS-262:
--
Attachment: r262_20181006.patch

> Fix compilation warning and deprecated api usage
> 
>
> Key: RATIS-262
> URL: https://issues.apache.org/jira/browse/RATIS-262
> Project: Ratis
>  Issue Type: Bug
>  Components: build
>Reporter: Elek, Marton
>Priority: Minor
> Attachments: r262_20181006.patch
>
>
> During the 0.2.0-rc2 vote [~khmarbaise] wrote the following comment:
> {quote}
> so far so good and got several messages about deprecated calls and things 
> like this: 
>  
> INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ 
> ratis-server --- 
> [INFO] Compiling 55 source files to 
> /Users/kama/Downloads/ratis-incubating-0.2.0/ratis-server/target/classes 
> [WARNING] 
> /Users/kama/Downloads/ratis-incubating-0.2.0/ratis-server/src/main/java/org/apache/ratis/server/storage/MemoryRaftLog.java:[48,26]
>  [try] auto-closeable resource readLock is never referenced in body of 
> corresponding try statement 
> [WARNING] 
> /Users/kama/Downloads/ratis-incubating-0.2.0/ratis-server/src/main/java/org/apache/ratis/server/storage/MemoryRaftLog.java:[57,26]
>  [try] auto-closeable resource readLock is never referenced in body of 
> corresponding try statement 
> [WARNING] 
> /Users/kama/Downloads/ratis-incubating-0.2.0/ratis-server/src/main/java/org/apache/ratis/server/storage/MemoryRaftLog.java:[67,26]
>  [try] auto-closeable resource readLock is never referenced in body of 
> corresponding try statement 
> [WARNING] 
> /Users/kama/Downloads/ratis-incubating-0.2.0/ratis-server/src/main/java/org/apache/ratis/server/storage/MemoryRaftLog.java:[85,26]
>  [try] auto-closeable resource writeLock is never referenced in body of 
> corresponding try statement 
>  
> which are not really a problem...can be fixed in the next release... 
> {quote}
> Would be great to fix them long-term.



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


[jira] [Commented] (RATIS-341) Raft log index on the follower should be applied to state machine only after writing the log

2018-10-06 Thread Shashikant Banerjee (JIRA)


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

Shashikant Banerjee commented on RATIS-341:
---

Thanks [~msingh] for the patch and offline discussion. I am +1 on this.

> Raft log index on the follower should be applied to state machine only after 
> writing the log
> 
>
> Key: RATIS-341
> URL: https://issues.apache.org/jira/browse/RATIS-341
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Affects Versions: 0.3.0
>Reporter: Mukul Kumar Singh
>Assignee: Mukul Kumar Singh
>Priority: Major
> Fix For: 0.3.0
>
> Attachments: RATIS-341.002.patch
>
>
> In follower, RaftServerImpl#appendEntriesAsync, entries should only be 
> applied to state machine
> only after writing the log to the state machine.



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