Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
5.1.3
-
None
-
None
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
- links to