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

Chen Liang commented on HDFS-13779:
-----------------------------------

Thanks for the correction [~xkrogen]! Makes sense to me. I recall one example 
case I was thinking of was say there are 0, 1, 2 proxies, and currentIndex = 2. 
If 1 gets removed and the list shrinks to 0, 2. Due to modulo on size, seems 
currentIndex would effectively point to 2%size (2) = 0, but it was meant to 
point to 2. I guess the whole point I was concerning was that since 
{{currentObservers}} is based on modulo of size, but size can be changing at 
any point of time, {{currentIndex}} can become not so current over time. But 
seems even if  {{currentIndex}} is wrong, it should be eventually fixed by the 
for loop, and  thanks for point out that this should only happen in failover 
actions. I agree this should not be an issue.

> Implement performFailover logic for ObserverReadProxyProvider.
> --------------------------------------------------------------
>
>                 Key: HDFS-13779
>                 URL: https://issues.apache.org/jira/browse/HDFS-13779
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>            Reporter: Konstantin Shvachko
>            Assignee: Erik Krogen
>            Priority: Major
>         Attachments: HDFS-13779-HDFS-12943.WIP00.patch
>
>
> Currently {{ObserverReadProxyProvider}} inherits {{performFailover()}} method 
> from {{ConfiguredFailoverProxyProvider}}, which simply increments the index 
> and switches over to another NameNode. The logic for ORPP should be smart 
> enough to choose another observer, otherwise it can switch to a SBN, where 
> reads are disallowed, or to an ANN, which defeats the purpose of reads from 
> standby.
> This was discussed in HDFS-12976.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to