[ https://issues.apache.org/jira/browse/HDFS-12976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16506350#comment-16506350 ]
Erik Krogen commented on HDFS-12976: ------------------------------------ My inclination for handling this race condition is to instead use an {{AtomicInteger}}... But I guess the real question is whether we want all threads from a single client to go to the same observer, or to spread them out. I guess I would lean towards a client using only one observer for simplicity, and letting the fact that there are many clients do the load balancing. It seems easier to reason about, and may make consistency management a bit more simple. Yeah, that is an example of my concern. Using the current strategy I guess we could just refresh the (active/standby) and observer lists upon any failover-type event. Thinking more about it, I think the root of my concern comes down to fetching the service state from all NameNodes. This is a departure from the old approach in which we just try nodes in a round-robin fashion until we find one matching the desired state. If one node is responding slowly, this will slow down the initialization and failover times for all clients. Or if a node is temporarily unresponsive, the current methodology will never add it to either of the proxy lists. I think we need to more carefully consider this decision. > Introduce ObserverReadProxyProvider > ----------------------------------- > > Key: HDFS-12976 > URL: https://issues.apache.org/jira/browse/HDFS-12976 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: hdfs-client > Reporter: Konstantin Shvachko > Assignee: Chao Sun > Priority: Major > Attachments: HDFS-12976-HDFS-12943.000.patch, HDFS-12976.WIP.patch > > > {{StandbyReadProxyProvider}} should implement {{FailoverProxyProvider}} > interface and be able to submit read requests to ANN and SBN(s). -- 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