bhattmanish98 opened a new pull request, #7436:
URL: https://github.com/apache/hadoop/pull/7436

   Description
   
-----------------------------------------------------------------------------------------------------------------------------------------------
   CreatePath and RenamePath APIs are idempotent as subsequent retries on same 
resource don’t change the server state[[1]](bookmark://rfcIdempotency). 
However, when client experiences connection break on the CreatePath and the 
RenamePath APIs, client cannot make sense if the request is accepted by the 
server or not. 
   
   On connection failure, the client retries the request. The server might 
return 404 (sourceNotFound) in case of RenamePath API and 409 
(pathAlreadyExists) in case of CreatePath (overwrite=false) API. Now the client 
doesn’t have a path forward. Reason being, in case of CreatePath, client 
doesn’t know if the path was created on the original request or the path was 
already there for some other request, in case of RenamePath, client doesn’t 
know if the source was removed because of the original-try or it was not there 
on the first place.
   
   Proposed Solution
   
---------------------------------------------------------------------------------------------------------------------------------------------
   Driver will send addition header "x-ms-client-transaction-id" which will 
store by the server. In case first call fails because of time out and retry 
happens and server throw source not found (in case of rename) and path already 
exist (in case of create call). Driver will do list call on the path and check 
whether the "x-ms-client-transaction-id" returned by server same as what driver 
has at its end. In such case driver will return success to the caller.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to