phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-4579) Add a config to conditionally create Phoenix meta tables on first client connection
Date Thu, 22 Mar 2018 17:59:00 GMT


ASF GitHub Bot commented on PHOENIX-4579:

Github user JamesRTaylor commented on a diff in the pull request:
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/query/
    @@ -2405,16 +2413,26 @@ public Void call() throws Exception {
                                 hConnectionEstablished = true;
                                 boolean isDoNotUpgradePropSet = UpgradeUtil.isNoUpgradeSet(props);
    +                            boolean doesSystemCatalogAlreadyExist = false;
    --- End diff --
    The flow of this code is very confusing. Let's do the compatibility check only once in
ensureTableCreated by making the following changes:
    - do not call ensureTableCreated from createTable if the table is a system table
    - call ensureTableCreated instead here and remove this entire try block
    - do all checks required in ensureTableCreated where we already determine if the table
exists or not
    - in ensureTableCreated, if SYSTEM.CATALOG doesn't exist and !isAutoUpgradeEnabled or
isDoNotUpgradePropSet, then throw our standard UpgradeRequiredException immediately without
creating system catalog metadata.
    - the only call to checkClientServerCompatibility should be in ensureTableCreated (when
isMetaTable is true)
    - make sure to be defensive in the creation of the SYSTEM namespace and moving of SYSTEM
tables as it's possible that multiple clients may be attempting to do that.
    I think this improve the maintainability of this code (and fix this issue too).

> Add a config to conditionally create Phoenix meta tables on first client connection
> -----------------------------------------------------------------------------------
>                 Key: PHOENIX-4579
>                 URL:
>             Project: Phoenix
>          Issue Type: New Feature
>            Reporter: Mujtaba Chohan
>            Assignee: Chinmay Kulkarni
>            Priority: Major
>         Attachments: PHOENIX-4579.patch
> Currently we create/modify Phoenix meta tables on first client connection. Adding a property
to make it configurable (with default true as it is currently implemented).
> With this property set to false, it will avoid lockstep upgrade requirement for all clients
when changing meta properties using PHOENIX-4575 as this property can be flipped back on
once all the clients are upgraded.

This message was sent by Atlassian JIRA

View raw message