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

Konstantin Shvachko commented on HDFS-12977:
--------------------------------------------

I agree try/finally look excessive. In order to avoid it you should go deeper, 
probably into RpcEngine and update the Call there using some (possibly new) 
abstract method like postUpdate(). Sorry this is vague, will need to dig into 
RPC code to be more precise.
Minor things:
# Should use {{HdfsServerConstants.INVALID_TXID}} for 
{{INVALID_TRANSACTION_ID}}.
# {{updateRpcClientTransactionId()}} should reuse code with 
{{getCurrentEditLogTxid()}}, also better use 
{{FSNamesystem.getLastWrittenTransactionId()}} than accessing editsLog.

> 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
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to