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

Chen Liang commented on HDFS-13880:
-----------------------------------

Post v001 patch. The basic approach is that, extending {{ReadOnly}} annotation 
to have one more method {{isMasync}}. If a method in {{ClientProtocol}} is 
annotated with {{isMasync = true}}, the sever will not checking for it's state 
id. The call will be processed regardless of server state. Calling this Masync 
to be consistent with Msync and differing from general notion of async.

I was exploring different ways but found this actually tricky to do. The 
current way server checks this in v001 patch is based on method name: server 
checks method name in the call rpc header, if there is a method of the same 
name found in {{ClientProtocol}}, the annotation of this method in 
{{ClientProtocol}} will be checked. This is done in {{GlobalStateIdContext}}.

Also, in current patch, two methods  {{getStats}} and {{getContentSummary}} are 
annotated with {{isMasync = true}}.

> Add mechanism to allow certain RPC calls to bypass sync
> -------------------------------------------------------
>
>                 Key: HDFS-13880
>                 URL: https://issues.apache.org/jira/browse/HDFS-13880
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>            Reporter: Chen Liang
>            Assignee: Chen Liang
>            Priority: Major
>         Attachments: HDFS-13880-HDFS-12943.001.patch
>
>
> Currently, every single call to NameNode will be synced, in the sense that 
> NameNode will not process it until state id catches up. But in certain cases, 
> we would like to bypass this check and allow the call to return immediately, 
> even when the server id is not up to date. One case could be the to-be-added 
> new API in HDFS-13749 that request for current state id. Others may include 
> calls that do not promise real time responses such as {{getContentSummary}}. 
> This Jira is to add the mechanism to allow certain calls to bypass sync.



--
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

Reply via email to