Repository: phoenix Updated Branches: refs/heads/4.x-HBase-1.3 bb67a6534 -> 1813af615
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/1813af61 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/1813af61 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/1813af61 Branch: refs/heads/4.x-HBase-1.3 Commit: 1813af61598ba2dba3cbada7272ced16836ff77d Parents: bb67a65 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:11 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/1813af61/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/1813af61/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 728f3f8..becd116 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 @@ -345,6 +345,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";