[
https://issues.apache.org/jira/browse/HDFS-13779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16595743#comment-16595743
]
Erik Krogen commented on HDFS-13779:
------------------------------------
Thanks for the review [~vagarychen]!
# Sure, it is only used for logging how many failed, so sounds good to me.
# The lock is needed before the if-check, else the {{currentProxy}} could have
changed after checking but before locking. We could add a double check (once
before lock, once after lock), but since {{changeProxy}} is only called when an
observer has a failure I don't think we need to try too hard to optimize its
synchronization. {{getCurrentProxy}}, on the other hand, is called on every RPC
which is why I wanted to make sure it wasn't synchronized.
# Sure, seems good
# {{createProxyIfNeeded}} will only create it once, yes, but the
{{NNProxyInfo}} instances within {{ObserverReadProxyProvider}} are not the same
as the ones within {{ConfiguredFailoverProxyProvider}} (it is delegation, not
inheritance), so the proxy will still be created twice if
{{CachingHAProxyFactory}} is not used. I am open to cleaner solutions to avoid
the redundant proxy creation, though.
> 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.000.patch,
> 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: [email protected]
For additional commands, e-mail: [email protected]