Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-7230

Optimize rpc call to master if all indexes are migrated to new coprocs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.1.3
    • 5.2.0
    • None
    • None
    • Hide
      Use "phoenix.index.region.observer.enabled.all.tables" as "false" only if new index coprocs (GlobalIndexChecker, IndexRegionObserver etc) are not in use by all tables. Default value "true" indicates that we will not perform extra RPC call to retrieve TableDescriptor for all Mutations.
      Show
      Use "phoenix.index.region.observer.enabled.all.tables" as "false" only if new index coprocs (GlobalIndexChecker, IndexRegionObserver etc) are not in use by all tables. Default value "true" indicates that we will not perform extra RPC call to retrieve TableDescriptor for all Mutations.

    Description

      If all the tables of the cluster have been migrated to the new index coprocs (GlobalIndexChecker, IndexRegionObserver), for every mutation, we should avoid making additional rpc call to master to retrieve TableDescriptor to determine if the table descriptor has GlobalIndexChecker coproc enabled:

      at org.apache.phoenix.query.ConnectionQueryServicesImpl.getTableDescriptor(ConnectionQueryServicesImpl.java:605)
      at org.apache.phoenix.util.IndexUtil.isGlobalIndexCheckerEnabled(IndexUtil.java:311)
      at org.apache.phoenix.execute.MutationState.filterIndexCheckerMutations(MutationState.java:1680)
      at org.apache.phoenix.execute.MutationState.sendBatch(MutationState.java:1255)
      at org.apache.phoenix.execute.MutationState.send(MutationState.java:1186)
      at org.apache.phoenix.execute.MutationState.send(MutationState.java:2028)
      at org.apache.phoenix.execute.MutationState.commit(MutationState.java:1840)
      at org.apache.phoenix.jdbc.PhoenixConnection$2.call(PhoenixConnection.java:841)
      at org.apache.phoenix.jdbc.PhoenixConnection$2.call(PhoenixConnection.java:836)
      at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
      at org.apache.phoenix.jdbc.PhoenixConnection.commit(PhoenixConnection.java:836) 

      We already use config "phoenix.index.region.observer.enabled" to disable/enable new index coproc during upgrade. The primary purpose of this config is to add/remove new or old index coprocs during upgrade process.

      We can introduce new config "phoenix.index.region.observer.enabled.alltables" with default value true. Unless the config is disabled, we should avoid call to "IndexUtil#isGlobalIndexCheckerEnabled" within filterIndexCheckerMutations().

      Attachments

        Issue Links

          Activity

            People

              palashc Palash Chauhan
              vjasani Viraj Jasani
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: