This change pulls out some of the refactoring that is being done for adding batch support into its own PR.
*client.handleResultError checks the error on an RPC response and takes action such as marking a client connection down or re-establishing a region.
getRegionAndClientForRPC finds the region and region client for an RPC and similarly handles the case of establishing/re-establishing a region.
SendRPC and sendRPCToRegion (now sendRPCToRegionClient), are shorter and simpler because the error handling has been pulled out. There should be no significant behavior changes. If I could easily, I would have deleted sendRPCToRegionClient and inlined its code in SendRPC, but it would have made testing it a bit harder.
This change pulls out some of the refactoring that is being done for adding batch support into its own PR.
*client.handleResultError
checks the error on an RPC response and takes action such as marking a client connection down or re-establishing a region.getRegionAndClientForRPC
finds the region and region client for an RPC and similarly handles the case of establishing/re-establishing a region.SendRPC
andsendRPCToRegion
(nowsendRPCToRegionClient
), are shorter and simpler because the error handling has been pulled out. There should be no significant behavior changes. If I could easily, I would have deletedsendRPCToRegionClient
and inlined its code inSendRPC
, but it would have made testing it a bit harder.