hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen Liang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-12977) Add stateId to RPC headers.
Date Thu, 21 Jun 2018 21:54:00 GMT

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

Chen Liang commented on HDFS-12977:
-----------------------------------

It seems the name space ID is picked up here by reading {{namesystem.getLastWrittenTransactionId()}}.
I am thinking would it be better to pick up {{namesystem.getFSImage().getLastAppliedOrWrittenTxId()}}
instead?

My understanding is that (please correct me if I'm wrong), {{getLastWrittenTransactionId()}}
returns the last id that has been written to persistent storage, while {{getLastAppliedOrWrittenTxId()}}
returns the last id that has been written storage, OR has been applied to name space, but
not yet persisted, whichever is larger. I think as long as a change is applied to Standby
in memory namespace, the id can be safely made visible for client to read, there seems no
need to wait longer for it to be persisted here. What do you think [~shv], [~zero45]?

> 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
>             Fix For: HDFS-12943
>
>         Attachments: HDFS_12977.trunk.001.patch, HDFS_12977.trunk.002.patch, HDFS_12977.trunk.003.patch,
HDFS_12977.trunk.004.patch, HDFS_12977.trunk.005.patch, HDFS_12977.trunk.006.patch, HDFS_12977.trunk.007.patch,
HDFS_12977.trunk.008.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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message