[jira] [Updated] (RATIS-97) Leader may not have majority after setConfiguration

2017-08-01 Thread Tsz Wo Nicholas Sze (JIRA)

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

Tsz Wo Nicholas Sze updated RATIS-97:
-
Attachment: r97_20170801b.patch

r97_20170801b.patch: fixes NetUtils.address2String(..) so that it works with 
ipv6 addresses.

> Leader may not have majority after setConfiguration
> ---
>
> Key: RATIS-97
> URL: https://issues.apache.org/jira/browse/RATIS-97
> Project: Ratis
>  Issue Type: Bug
>Reporter: Tsz Wo Nicholas Sze
>Assignee: Tsz Wo Nicholas Sze
> Attachments: r97_20170728.patch, r97_20170731.patch, 
> r97_20170801b.patch, r97_20170801.patch
>
>
> Here is an example: Suppose a group has 3 servers and one of them is the 
> leader.  Use setConfiguration to add 6 more servers.  The leader is still 
> running as a leader although it does not has majority anymore.  The 6 new 
> servers may elect a new leader among them.  Finally, there are two leaders in 
> the group.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RATIS-96) LeaderState computeLastCommitted may throw ArrayIndexOutOfBoundsException

2017-08-01 Thread Tsz Wo Nicholas Sze (JIRA)

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

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

Thanks Jing for reviewing and committing the patch!

> LeaderState computeLastCommitted may throw ArrayIndexOutOfBoundsException
> -
>
> Key: RATIS-96
> URL: https://issues.apache.org/jira/browse/RATIS-96
> Project: Ratis
>  Issue Type: Bug
>Reporter: Tsz Wo Nicholas Sze
>Assignee: Tsz Wo Nicholas Sze
> Fix For: 0.2.0-alpha
>
> Attachments: r96_20170720.patch, r96_20170725.patch, 
> r96_20170727.patch, r96_20170731.patch
>
>
> {code}
> java.lang.ArrayIndexOutOfBoundsException: 0
>   at 
> org.apache.ratis.server.impl.LeaderState.computeLastCommitted(LeaderState.java:490)
>   at 
> org.apache.ratis.server.impl.LeaderState.updateLastCommitted(LeaderState.java:400)
>   at 
> org.apache.ratis.server.impl.LeaderState.handleEvent(LeaderState.java:329)
>   at 
> org.apache.ratis.server.impl.LeaderState.access$500(LeaderState.java:48)
> {code}
> This happens when followers is empty and not includeSelf == false.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (RATIS-96) LeaderState computeLastCommitted may throw ArrayIndexOutOfBoundsException

2017-08-01 Thread Jing Zhao (JIRA)

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

Jing Zhao resolved RATIS-96.

   Resolution: Fixed
Fix Version/s: 0.2.0-alpha

I've committed the patch. Thanks for the fix, Nicholas!

> LeaderState computeLastCommitted may throw ArrayIndexOutOfBoundsException
> -
>
> Key: RATIS-96
> URL: https://issues.apache.org/jira/browse/RATIS-96
> Project: Ratis
>  Issue Type: Bug
>Reporter: Tsz Wo Nicholas Sze
>Assignee: Tsz Wo Nicholas Sze
> Fix For: 0.2.0-alpha
>
> Attachments: r96_20170720.patch, r96_20170725.patch, 
> r96_20170727.patch, r96_20170731.patch
>
>
> {code}
> java.lang.ArrayIndexOutOfBoundsException: 0
>   at 
> org.apache.ratis.server.impl.LeaderState.computeLastCommitted(LeaderState.java:490)
>   at 
> org.apache.ratis.server.impl.LeaderState.updateLastCommitted(LeaderState.java:400)
>   at 
> org.apache.ratis.server.impl.LeaderState.handleEvent(LeaderState.java:329)
>   at 
> org.apache.ratis.server.impl.LeaderState.access$500(LeaderState.java:48)
> {code}
> This happens when followers is empty and not includeSelf == false.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)