This is an automated email from the ASF dual-hosted git repository. skadam pushed a commit to branch 4.x-HBase-1.3 in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/4.x-HBase-1.3 by this push: new 8ff8cce PHOENIX-5359: Remove (Global-Indexing)new coprocessors in CQSI#addCoprocessors with flag(INDEX_REGION_OBSERVER_ENABLED_ATTRIB) disabled 8ff8cce is described below commit 8ff8cce7fff659b9d3a34fc43e0360dec84391ac Author: s.kadam <ska...@apache.org> AuthorDate: Thu Jun 20 11:58:55 2019 -0700 PHOENIX-5359: Remove (Global-Indexing)new coprocessors in CQSI#addCoprocessors with flag(INDEX_REGION_OBSERVER_ENABLED_ATTRIB) disabled --- .../apache/phoenix/query/ConnectionQueryServicesImpl.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java index 3a44446..258e676 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java @@ -899,12 +899,14 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement TransactionFactory.Provider provider = getTransactionProvider(tableProps); boolean isTransactional = (provider != null); - boolean globalIndexerEnabled = config.getBoolean( + boolean indexRegionObserverEnabled = config.getBoolean( QueryServices.INDEX_REGION_OBSERVER_ENABLED_ATTRIB, QueryServicesOptions.DEFAULT_INDEX_REGION_OBSERVER_ENABLED); if (tableType == PTableType.INDEX && !isTransactional) { - if (globalIndexerEnabled && !descriptor.hasCoprocessor(GlobalIndexChecker.class.getName())) { + if (!indexRegionObserverEnabled && descriptor.hasCoprocessor(GlobalIndexChecker.class.getName())) { + descriptor.removeCoprocessor(GlobalIndexChecker.class.getName()); + } else if (indexRegionObserverEnabled && !descriptor.hasCoprocessor(GlobalIndexChecker.class.getName())) { descriptor.addCoprocessor(GlobalIndexChecker.class.getName(), null, priority - 1, null); } } @@ -945,7 +947,10 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement if (descriptor.hasCoprocessor(PhoenixTransactionalIndexer.class.getName())) { descriptor.removeCoprocessor(PhoenixTransactionalIndexer.class.getName()); } - if (globalIndexerEnabled) { + if (indexRegionObserverEnabled) { + if (descriptor.hasCoprocessor(Indexer.class.getName())) { + descriptor.removeCoprocessor(Indexer.class.getName()); + } if (!descriptor.hasCoprocessor(IndexRegionObserver.class.getName())) { Map<String, String> opts = Maps.newHashMapWithExpectedSize(1); opts.put(NonTxIndexBuilder.CODEC_CLASS_NAME_KEY, PhoenixIndexCodec.class.getName()); @@ -953,6 +958,9 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement } } else { + if (descriptor.hasCoprocessor(IndexRegionObserver.class.getName())) { + descriptor.removeCoprocessor(IndexRegionObserver.class.getName()); + } if (!descriptor.hasCoprocessor(Indexer.class.getName())) { Map<String, String> opts = Maps.newHashMapWithExpectedSize(1); opts.put(NonTxIndexBuilder.CODEC_CLASS_NAME_KEY, PhoenixIndexCodec.class.getName());