[ https://issues.apache.org/jira/browse/HDFS-12977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16396403#comment-16396403 ]
Konstantin Shvachko commented on HDFS-12977: -------------------------------------------- Was looking into this and realized the main problem here is that we still set {{transactionId}} explicitly in {{ipc.Server.setupResponse()}}, which defeats the purpose of abstracting the state context. Here is a suggestion # May be a better name for the {{CallStateHandler}} interface would be {{ServerStateContext}} #- with abstract method {code}void updateResponseState(RpcResponseHeaderProto.Builder responseHeader);{code} #- Then we should have a class {{NNStateIdContext}} in {{NameNodeRPCServer}}, with the {{namesystem}} as its member, and which sets txId into the header. # {{ipc.Server}} has additional member {{serverStateContext}}. Then {{ipc.Server.setupResponse()}} should make a call: {code} if(callStateHandler != null) callStateHandler.updateResponseState(headerBuilder); {code} # This should eliminate other changes like adding {{Server.Call.transactionId}} or changing {{ProtobufRPCEngine.call()}} method. # We should use {{stateId}} consistently instead of {{transactionId}}. LMK if it makes sense. > Add stateId to RPC headers. > --------------------------- > > Key: HDFS-12977 > URL: https://issues.apache.org/jira/browse/HDFS-12977 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: ipc, namenode > Reporter: Konstantin Shvachko > Assignee: Plamen Jeliazkov > Priority: Major > Attachments: HDFS_12977.trunk.001.patch, HDFS_12977.trunk.002.patch, > HDFS_12977.trunk.003.patch > > > stateId is a new field in the RPC headers of NameNode proto calls. > stateId is the journal transaction Id, which represents LastSeenId for the > clients and LastWrittenId for NameNodes. See more in [reads from Standby > design > doc|https://issues.apache.org/jira/secure/attachment/12902925/ConsistentReadsFromStandbyNode.pdf]. -- 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