Repository: phoenix Updated Branches: refs/heads/4.x-HBase-1.4 3ca3552d7 -> d0a115ce0
PHOENIX-4765 Add client and server side config property to enable rollback of splittable System Catalog if required (addendum) Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/d0a115ce Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/d0a115ce Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/d0a115ce Branch: refs/heads/4.x-HBase-1.4 Commit: d0a115ce05909180e99515d37ecf7689a8505611 Parents: 3ca3552 Author: Thomas D'Silva <tdsi...@apache.org> Authored: Tue Nov 27 13:46:19 2018 -0800 Committer: Thomas D'Silva <tdsi...@apache.org> Committed: Tue Nov 27 13:47:17 2018 -0800 ---------------------------------------------------------------------- .../java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java | 2 ++ .../src/main/java/org/apache/phoenix/query/QueryServices.java | 3 +++ 2 files changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/d0a115ce/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java index 14caca3..d138132 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java @@ -2678,6 +2678,8 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso private MetaDataResponse processRemoteRegionMutations(byte[] systemTableName, List<Mutation> remoteMutations, MetaDataProtos.MutationCode mutationCode) throws IOException { + if (remoteMutations.isEmpty()) + return null; MetaDataResponse.Builder builder = MetaDataResponse.newBuilder(); try (Table hTable = env.getTable( http://git-wip-us.apache.org/repos/asf/phoenix/blob/d0a115ce/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java index 1c17da9..8e17749 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java @@ -348,6 +348,9 @@ public interface QueryServices extends SQLCloseable { // feature // // By default this config is false meaning that rolling back the upgrade is not possible + // If this config is true and you want to rollback the upgrade be sure to run the sql commands in + // UpgradeUtil.addParentToChildLink which will recreate the PARENT->CHILD links in SYSTEM.CATALOG. This is needed + // as from 4.15 onwards the PARENT->CHILD links are stored in a separate SYSTEM.CHILD_LINK table. public static final String ALLOW_SPLITTABLE_SYSTEM_CATALOG_ROLLBACK = "phoenix.allow.system.catalog.rollback";