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

CoprocessorHConnection#getConnectionForEnvironment should read config from CoprocessorEnvironment

Add voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 3.0.0-alpha-4
    • None
    • None

    Description

      It seems like the method getConnectionForEnvironment isn't doing the right thing when it is creating a CoprocessorHConnection by reading the config from HRegionServer and not from the env passed in.

      If coprocessors want to use a CoprocessorHConnection with some custom config settings, then they have no option but to configure it in the hbase-site.xml of the region servers. This isn't ideal as a lot of times these "global" level configs can have side effects. See PHOENIX-3974 as an example where configuring ServerRpcControllerFactory (a Phoenix implementation of RpcControllerFactory) could result in deadlocks. Or PHOENIX-3983 where presence of this global config causes our index rebuild code to incorrectly use handlers it shouldn't.

      If the CoprocessorHConnection created through getConnectionForEnvironment API used the CoprocessorEnvironment config, then it would allow co-processors to pass in their own config without needing to configure them in hbase-site.xml.

      The change would be simple. Basically change the below

      if (services instanceof HRegionServer) {
              return new CoprocessorHConnection((HRegionServer) services);
      }
      

      to

      if (services instanceof HRegionServer) {
              return new CoprocessorHConnection(env.getConfiguration(), (HRegionServer) services);
      }
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            samarthjain Samarth Jain

            Dates

              Created:
              Updated:

              Slack

                Issue deployment