Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.0-alpha1
-
None
-
None
-
Reviewed
Description
Currently the RetryInvocationHandler uses the same RPC ids (i.e., clientId + callId) only when the invocation is a RPC invocation. To check whether an invocation is RPC, RetryInvocationHandler#isRpcInvocation directly apply Proxy#isProxyClass on RetryInvocation#currentProxy. However, if currentProxy is an instance of ProtocolTranslator (e.g., ClientNamenodeProtocolTranslatorPB), the real dynamically-generated proxy object is contained within currentProxy and needs to be retrieved by calling ProtocolTranslator#getUnderlyingProxyObject. Failing to recognize a RPC invocation can cause a retry request to have different "clientId + callId" with its initial call, and fail to hit the corresponding retry cache entry in the NameNode side.