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

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

It seems that we could simply use ArrayList instead of CopyOnWriteArrayList.  
Will check it with the unit tests.

> LeaderState.updateSenders may throws UnsupportedOperationException
> ------------------------------------------------------------------
>
>                 Key: RATIS-103
>                 URL: https://issues.apache.org/jira/browse/RATIS-103
>             Project: Ratis
>          Issue Type: Bug
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Tsz Wo Nicholas Sze
>            Priority: Minor
>
> The CopyOnWriteArrayList may not work well in LeaderState since it does not 
> support remove.
> RaftReconfigurationBaseTest.testRemovePeers() fails with 
> UnsupportedOperationException.
> {code}
> Exception in thread "Thread-102" java.lang.UnsupportedOperationException
>         at 
> java.util.concurrent.CopyOnWriteArrayList$COWIterator.remove(CopyOnWriteArrayList.java:1176)
>         at 
> org.apache.ratis.server.impl.LeaderState.updateSenders(LeaderState.java:254)
>         ...
> {code}



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

Reply via email to