[jira] [Resolved] (RATIS-62) Return the Exception from StateMachine#preAppendTransaction to client as StateMachineException

2017-03-31 Thread Jing Zhao (JIRA)

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

Jing Zhao resolved RATIS-62.

   Resolution: Fixed
Fix Version/s: 0.1.0-alpha

Thanks for the review, Mingliang! I've committed the patch.

> Return the Exception from StateMachine#preAppendTransaction to client as 
> StateMachineException
> --
>
> Key: RATIS-62
> URL: https://issues.apache.org/jira/browse/RATIS-62
> Project: Ratis
>  Issue Type: Bug
>Reporter: Jing Zhao
>Assignee: Jing Zhao
> Fix For: 0.1.0-alpha
>
> Attachments: RATIS-62.000.patch
>
>
> This is a TODO in RaftServerImpl#appendTransaction. The IOException thrown by 
> {{applyLog}} is actually from the {{StateMachine#preAppendTransaction}}. This 
> exception should be return to RaftClient as a {{StateMachineException}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (RATIS-62) Return the Exception from StateMachine#preAppendTransaction to client as StateMachineException

2017-03-31 Thread Mingliang Liu (JIRA)

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

Mingliang Liu commented on RATIS-62:


+1

> Return the Exception from StateMachine#preAppendTransaction to client as 
> StateMachineException
> --
>
> Key: RATIS-62
> URL: https://issues.apache.org/jira/browse/RATIS-62
> Project: Ratis
>  Issue Type: Bug
>Reporter: Jing Zhao
>Assignee: Jing Zhao
> Attachments: RATIS-62.000.patch
>
>
> This is a TODO in RaftServerImpl#appendTransaction. The IOException thrown by 
> {{applyLog}} is actually from the {{StateMachine#preAppendTransaction}}. This 
> exception should be return to RaftClient as a {{StateMachineException}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (RATIS-62) Return the Exception from StateMachine#preAppendTransaction to client as StateMachineException

2017-03-31 Thread Jing Zhao (JIRA)

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

Jing Zhao updated RATIS-62:
---
Attachment: RATIS-62.000.patch

Upload the patch.

> Return the Exception from StateMachine#preAppendTransaction to client as 
> StateMachineException
> --
>
> Key: RATIS-62
> URL: https://issues.apache.org/jira/browse/RATIS-62
> Project: Ratis
>  Issue Type: Bug
>Reporter: Jing Zhao
>Assignee: Jing Zhao
> Attachments: RATIS-62.000.patch
>
>
> This is a TODO in RaftServerImpl#appendTransaction. The IOException thrown by 
> {{applyLog}} is actually from the {{StateMachine#preAppendTransaction}}. This 
> exception should be return to RaftClient as a {{StateMachineException}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (RATIS-62) Return the Exception from StateMachine#preAppendTransaction to client as StateMachineException

2017-03-31 Thread Jing Zhao (JIRA)

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

Jing Zhao reassigned RATIS-62:
--

Assignee: Jing Zhao

> Return the Exception from StateMachine#preAppendTransaction to client as 
> StateMachineException
> --
>
> Key: RATIS-62
> URL: https://issues.apache.org/jira/browse/RATIS-62
> Project: Ratis
>  Issue Type: Bug
>Reporter: Jing Zhao
>Assignee: Jing Zhao
>
> This is a TODO in RaftServerImpl#appendTransaction. The IOException thrown by 
> {{applyLog}} is actually from the {{StateMachine#preAppendTransaction}}. This 
> exception should be return to RaftClient as a {{StateMachineException}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (RATIS-62) Return the Exception from StateMachine#preAppendTransaction to client as StateMachineException

2017-03-31 Thread Jing Zhao (JIRA)

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

Jing Zhao updated RATIS-62:
---
Summary: Return the Exception from StateMachine#preAppendTransaction to 
client as StateMachineException  (was: Wrap the Exception thrown by 
StateMachine#preAppendTransaction as StateMachineException and return the 
exception in RaftClientReply)

> Return the Exception from StateMachine#preAppendTransaction to client as 
> StateMachineException
> --
>
> Key: RATIS-62
> URL: https://issues.apache.org/jira/browse/RATIS-62
> Project: Ratis
>  Issue Type: Bug
>Reporter: Jing Zhao
>
> This is a TODO in RaftServerImpl#appendTransaction. The IOException thrown by 
> {{applyLog}} is actually from the {{StateMachine#preAppendTransaction}}. This 
> exception should be return to RaftClient as a {{StateMachineException}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (RATIS-62) Wrap the Exception thrown by StateMachine#preAppendTransaction as StateMachineException and return the exception in RaftClientReply

2017-03-31 Thread Jing Zhao (JIRA)
Jing Zhao created RATIS-62:
--

 Summary: Wrap the Exception thrown by 
StateMachine#preAppendTransaction as StateMachineException and return the 
exception in RaftClientReply
 Key: RATIS-62
 URL: https://issues.apache.org/jira/browse/RATIS-62
 Project: Ratis
  Issue Type: Bug
Reporter: Jing Zhao


This is a TODO in RaftServerImpl#appendTransaction. The IOException thrown by 
{{applyLog}} is actually from the {{StateMachine#preAppendTransaction}}. This 
exception should be return to RaftClient as a {{StateMachineException}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (RATIS-52) Refactor RaftUtils into different classes

2017-03-31 Thread Enis Soztutar (JIRA)

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

Enis Soztutar commented on RATIS-52:


bq. I think for this patch we can do the code refactoring work only, i.e., only 
moving the existing reflection-related methods out of RaftUtils.java
Fair enough. Let me commit the fixed version without new code. 

> Refactor RaftUtils into different classes
> -
>
> Key: RATIS-52
> URL: https://issues.apache.org/jira/browse/RATIS-52
> Project: Ratis
>  Issue Type: Improvement
>Reporter: Enis Soztutar
>Assignee: Enis Soztutar
> Fix For: 0.1.0-alpha
>
> Attachments: ratis-52-fix.patch, ratis-52_v1.patch, ratis-52_v2.patch
>
>
> Ideally we should not have a generic {{RaftUtils}} class. The code should be 
> broken up into at least: 
> {code}
> ReflectionUtils -> All reflection, construction, initialization logic 
> IOUtils -> Add buffer and IO logic 
> SystemUtils or PlatformUtils -> OS type detection, etc 
> Preconditions (or something like that) -> assertTrue, etc 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Resolved] (RATIS-10) Add retry cache support in raft peers for client requests

2017-03-31 Thread Jing Zhao (JIRA)

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

Jing Zhao resolved RATIS-10.

   Resolution: Fixed
Fix Version/s: 0.1.0-alpha

Most of the work has been done for the retry cache. We can resolve it now.

> Add retry cache support in raft peers for client requests
> -
>
> Key: RATIS-10
> URL: https://issues.apache.org/jira/browse/RATIS-10
> Project: Ratis
>  Issue Type: Improvement
>Reporter: Jing Zhao
>Assignee: Jing Zhao
>Priority: Critical
> Fix For: 0.1.0-alpha
>
>
> We need retry cache support on Raft servers to correctly handle client's 
> retry requests. During leader re-election, a client may hit a 
> {{NotLeaderException}} while the request has been committed by the old 
> leader. The new leader should be able to correctly recognize the retry 
> request from the client.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Resolved] (RATIS-17) Add basic retry cache implementation for Raft Server

2017-03-31 Thread Jing Zhao (JIRA)

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

Jing Zhao resolved RATIS-17.

   Resolution: Fixed
Fix Version/s: 0.1.0-alpha

I've committed this.

> Add basic retry cache implementation for Raft Server
> 
>
> Key: RATIS-17
> URL: https://issues.apache.org/jira/browse/RATIS-17
> Project: Ratis
>  Issue Type: Sub-task
>Reporter: Jing Zhao
>Assignee: Jing Zhao
> Fix For: 0.1.0-alpha
>
> Attachments: RATIS-17.000.patch, RATIS-17.001.patch, 
> RATIS-17.002.patch, RATIS-17.003.patch, RATIS-17.004.patch, 
> RATIS-17.005.patch, RATIS-17.006.patch
>
>
> This jira will add the basic data structure definition for the retry cache.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (RATIS-17) Add basic retry cache implementation for Raft Server

2017-03-31 Thread Jing Zhao (JIRA)

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

Jing Zhao commented on RATIS-17:


Thanks for the review, Nicholas! Since RATIS-52 got reopened, I will commit the 
006 patch shortly :)

> Add basic retry cache implementation for Raft Server
> 
>
> Key: RATIS-17
> URL: https://issues.apache.org/jira/browse/RATIS-17
> Project: Ratis
>  Issue Type: Sub-task
>Reporter: Jing Zhao
>Assignee: Jing Zhao
> Attachments: RATIS-17.000.patch, RATIS-17.001.patch, 
> RATIS-17.002.patch, RATIS-17.003.patch, RATIS-17.004.patch, 
> RATIS-17.005.patch, RATIS-17.006.patch
>
>
> This jira will add the basic data structure definition for the retry cache.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (RATIS-52) Refactor RaftUtils into different classes

2017-03-31 Thread Jing Zhao (JIRA)

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

Jing Zhao updated RATIS-52:
---
Attachment: ratis-52-fix.patch

The bug was caused by the newly added methods in ReflectionUtils.java, and it's 
mainly because of the several varargs methods. I think for this patch we can do 
the code refactoring work only, i.e., only moving the existing 
reflection-related methods out of RaftUtils.java. And we can add new methods 
when they are used in the replicated map work.

> Refactor RaftUtils into different classes
> -
>
> Key: RATIS-52
> URL: https://issues.apache.org/jira/browse/RATIS-52
> Project: Ratis
>  Issue Type: Improvement
>Reporter: Enis Soztutar
>Assignee: Enis Soztutar
> Fix For: 0.1.0-alpha
>
> Attachments: ratis-52-fix.patch, ratis-52_v1.patch, ratis-52_v2.patch
>
>
> Ideally we should not have a generic {{RaftUtils}} class. The code should be 
> broken up into at least: 
> {code}
> ReflectionUtils -> All reflection, construction, initialization logic 
> IOUtils -> Add buffer and IO logic 
> SystemUtils or PlatformUtils -> OS type detection, etc 
> Preconditions (or something like that) -> assertTrue, etc 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (RATIS-52) Refactor RaftUtils into different classes

2017-03-31 Thread Jing Zhao (JIRA)

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

Jing Zhao edited comment on RATIS-52 at 3/31/17 7:05 AM:
-

Ahh, I just fixed it... haha

I will post my change here and maybe it's helpful for the later fix.


was (Author: jingzhao):
Ahh, I just fixed it... haha

I will posted my change here and maybe it's helpful for the later fix.

> Refactor RaftUtils into different classes
> -
>
> Key: RATIS-52
> URL: https://issues.apache.org/jira/browse/RATIS-52
> Project: Ratis
>  Issue Type: Improvement
>Reporter: Enis Soztutar
>Assignee: Enis Soztutar
> Fix For: 0.1.0-alpha
>
> Attachments: ratis-52-fix.patch, ratis-52_v1.patch, ratis-52_v2.patch
>
>
> Ideally we should not have a generic {{RaftUtils}} class. The code should be 
> broken up into at least: 
> {code}
> ReflectionUtils -> All reflection, construction, initialization logic 
> IOUtils -> Add buffer and IO logic 
> SystemUtils or PlatformUtils -> OS type detection, etc 
> Preconditions (or something like that) -> assertTrue, etc 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (RATIS-52) Refactor RaftUtils into different classes

2017-03-31 Thread Jing Zhao (JIRA)

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

Jing Zhao commented on RATIS-52:


Ahh, I just fixed it... haha

I will posted my change here and maybe it's helpful for the later fix.

> Refactor RaftUtils into different classes
> -
>
> Key: RATIS-52
> URL: https://issues.apache.org/jira/browse/RATIS-52
> Project: Ratis
>  Issue Type: Improvement
>Reporter: Enis Soztutar
>Assignee: Enis Soztutar
> Fix For: 0.1.0-alpha
>
> Attachments: ratis-52_v1.patch, ratis-52_v2.patch
>
>
> Ideally we should not have a generic {{RaftUtils}} class. The code should be 
> broken up into at least: 
> {code}
> ReflectionUtils -> All reflection, construction, initialization logic 
> IOUtils -> Add buffer and IO logic 
> SystemUtils or PlatformUtils -> OS type detection, etc 
> Preconditions (or something like that) -> assertTrue, etc 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Reopened] (RATIS-52) Refactor RaftUtils into different classes

2017-03-31 Thread Tsz Wo Nicholas Sze (JIRA)

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

Tsz Wo Nicholas Sze reopened RATIS-52:
--

Sorry, I have tried to fix it but it is not very easy.  I have reverted it.

> Refactor RaftUtils into different classes
> -
>
> Key: RATIS-52
> URL: https://issues.apache.org/jira/browse/RATIS-52
> Project: Ratis
>  Issue Type: Improvement
>Reporter: Enis Soztutar
>Assignee: Enis Soztutar
> Fix For: 0.1.0-alpha
>
> Attachments: ratis-52_v1.patch, ratis-52_v2.patch
>
>
> Ideally we should not have a generic {{RaftUtils}} class. The code should be 
> broken up into at least: 
> {code}
> ReflectionUtils -> All reflection, construction, initialization logic 
> IOUtils -> Add buffer and IO logic 
> SystemUtils or PlatformUtils -> OS type detection, etc 
> Preconditions (or something like that) -> assertTrue, etc 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (RATIS-54) Bump maven.min.version to 3.3.9

2017-03-31 Thread Tsz Wo Nicholas Sze (JIRA)

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

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

Thanks for the review, 

> requiring the latest version is a bit aggressive, but I did not try with an 
> earlier 3.3 release. ...

It seems okay since it was released on 2015-11-14, more than a year ago.

> Do you mind changing the line in BUILDING.md:

Good catch.  Will do.

> Bump maven.min.version to 3.3.9
> ---
>
> Key: RATIS-54
> URL: https://issues.apache.org/jira/browse/RATIS-54
> Project: Ratis
>  Issue Type: Task
>Reporter: Tsz Wo Nicholas Sze
>Assignee: Tsz Wo Nicholas Sze
> Attachments: r54_20170330.patch
>
>
> [~enis] found that some earlier Maven 3.x version does not work well; see 
> [this 
> comment|https://issues.apache.org/jira/browse/RATIS-47?focusedCommentId=15935648=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15935648].
> Maven 3.3.9 is the latest stable release, released on 2015-11-14; see 
> https://maven.apache.org/docs/history.html
> It seems reasonable to require Maven 3.3.9.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (RATIS-52) Refactor RaftUtils into different classes

2017-03-31 Thread Jing Zhao (JIRA)

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

Jing Zhao commented on RATIS-52:


Looks like the patch breaks tests:
{code}
java.lang.UnsupportedOperationException: Unable to find suitable constructor 
for class org.apache.ratis.server.simulation.SimulatedRpc
at 
org.apache.ratis.server.simulation.TestRaftReconfigurationWithSimulatedRpc.getCluster(TestRaftReconfigurationWithSimulatedRpc.java:29)
{code}

> Refactor RaftUtils into different classes
> -
>
> Key: RATIS-52
> URL: https://issues.apache.org/jira/browse/RATIS-52
> Project: Ratis
>  Issue Type: Improvement
>Reporter: Enis Soztutar
>Assignee: Enis Soztutar
> Fix For: 0.1.0-alpha
>
> Attachments: ratis-52_v1.patch, ratis-52_v2.patch
>
>
> Ideally we should not have a generic {{RaftUtils}} class. The code should be 
> broken up into at least: 
> {code}
> ReflectionUtils -> All reflection, construction, initialization logic 
> IOUtils -> Add buffer and IO logic 
> SystemUtils or PlatformUtils -> OS type detection, etc 
> Preconditions (or something like that) -> assertTrue, etc 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (RATIS-17) Add basic retry cache implementation for Raft Server

2017-03-31 Thread Tsz Wo Nicholas Sze (JIRA)

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

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

+1 the 006 patch looks good.  Please update it with trunk and commit it.  
Thanks.


> Add basic retry cache implementation for Raft Server
> 
>
> Key: RATIS-17
> URL: https://issues.apache.org/jira/browse/RATIS-17
> Project: Ratis
>  Issue Type: Sub-task
>Reporter: Jing Zhao
>Assignee: Jing Zhao
> Attachments: RATIS-17.000.patch, RATIS-17.001.patch, 
> RATIS-17.002.patch, RATIS-17.003.patch, RATIS-17.004.patch, 
> RATIS-17.005.patch, RATIS-17.006.patch
>
>
> This jira will add the basic data structure definition for the retry cache.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)