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

Chris Nauroth commented on HDFS-4974:
-------------------------------------

I don't believe {{DatanodeProtocol#blockReceivedAndDeleted}} is safe to retry, 
due to things like modifying the pending replication count.  (i.e. A retry 
could cause 2 decrements of the block's pending replication count for the same 
replica.)

{{ClientProtocol#metaSave}} opens its output file for append, so retries would 
cause duplication of data in the output file.  This could be made idempotent by 
opening the output file for overwrite instead, though I don't know if the 
current append behavior is desired.

Is it correct that {{ClientProtocol#rollEdits}} is idempotent, but 
{{NamenodeProtocol#rollEditLog}} is non-idempotent?  The two methods are nearly 
identical.  They both call {{FSNamesystem#rollEditLog}}, which I believe is 
idempotent.
                
> Analyze and add annotations to Namenode and Datanode protocol methods to 
> enable retry
> -------------------------------------------------------------------------------------
>
>                 Key: HDFS-4974
>                 URL: https://issues.apache.org/jira/browse/HDFS-4974
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ha, namenode
>            Reporter: Suresh Srinivas
>
> This jira is intended for:
> # Discussing current @Idempotent annotations in HDFS protocols and adding 
> that annotation where it is missing.
> # Discuss how retry should be enabled for non-idempotent requests.
> I will post the analysis of current methods in subsequent comment.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to