[
https://issues.apache.org/jira/browse/HDFS-13880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16599074#comment-16599074
]
Erik Krogen commented on HDFS-13880:
------------------------------------
So if I understand correctly, this patch _only_ skips msync on methods which
are annotated with {{@ReadOnly(isMasync = true)}}. This won't help with
preventing methods such as {{getServiceState()}} from blocking; the solution
needs to be more general. At minimum, it should assume {{Masync}} by default if
no {{@ReadOnly}} annotation is present.
Also, right now it is only checking the name of the method.. This means that,
for example, if {{ClientProtocol#getState()}} and
{{HAServiceProtocol#getState()}} both exist, they will be treated the same. I
know this situation probably won't arise, but it seems wrong to compare method
equality based solely on the name of the method.
I also want to discuss why we do the check on the server side vs. client side.
It seems natural for the client to make the decision about whether or not it
wants a call to be sync'd, in the same way that it decides whether or not a
call can be serviced by the observer. In particular, the client-side
implementation in HDFS-13872 is quite a bit more clean than this current patch
IMO
> 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,
> HDFS-13880-HDFS-12943.002.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: [email protected]
For additional commands, e-mail: [email protected]