Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-13480

ShortCircuitConnection doesn't short-circuit all calls as expected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.0.0, 1.1.0, 2.0.0
    • 1.0.2, 1.2.0, 1.3.0, 1.1.3, 2.0.0
    • Client
    • None
    • Reviewed

    Description

      Noticed the following situation in debugging unexpected unit tests failures in HBASE-13351.

      ConnectionUtils#createShortCircuitHConnection(Connection, ServerName, AdminService.BlockingInterface, ClientService.BlockingInterface) is intended to avoid the extra RPC by calling the server's instantiation of the protobuf rpc stub directly for the AdminService and ClientService.

      The problem is that this is insufficient to actually avoid extra "remote" RPCs as all other calls to the Connection are routed to a "real" Connection instance. As such, any object created by the "real" Connection (such as an HTable) will use the real Connection, not the SSC.

      The end result is that MasterRpcService#reportRegionStateTransition(RpcController, ReportRegionStateTransitionRequest) will make additional "remote" RPCs over what it thinks is an SSC through a Get on HTable which was constructed using the SSC, but the Get itself will use the underlying real Connection instead of the SSC. With insufficiently sized thread pools, this has been observed to result in RPC deadlock in the HMaster where an RPC attempts to make another RPC but there are no more threads available to service the second RPC so the first RPC blocks indefinitely.

      Attachments

        1. HBASE-13480-branch-1.2.patch
          10 kB
          Jingcheng Du
        2. HBASE-13480-branch-1.1.patch
          10 kB
          Jingcheng Du
        3. HBASE-13480-branch-1.0.patch
          10 kB
          Jingcheng Du
        4. HBASE-13480-2.patch
          24 kB
          Jingcheng Du
        5. HBASE-13480-1.patch
          27 kB
          Jingcheng Du
        6. HBASE-13480.patch
          8 kB
          Jingcheng Du

        Issue Links

          Activity

            People

              jingcheng.du@intel.com Jingcheng Du
              elserj Josh Elser
              Votes:
              0 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: