[ 
https://issues.apache.org/jira/browse/PHOENIX-4579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16410616#comment-16410616
 ] 

ASF GitHub Bot commented on PHOENIX-4579:
-----------------------------------------

Github user ChinmaySKulkarni commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/295#discussion_r176611190
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 ---
    @@ -2405,16 +2413,26 @@ public Void call() throws Exception {
                                 openConnection();
                                 hConnectionEstablished = true;
                                 boolean isDoNotUpgradePropSet = 
UpgradeUtil.isNoUpgradeSet(props);
    +                            boolean doesSystemCatalogAlreadyExist = false;
    --- End diff --
    
    @JamesRTaylor A few follow-up questions from your comment:
    
    - If we were to call _ensureTableCreated_ at this point inside the init 
method, don't have the values of other arguments such as the families, splits, 
etc. which we would need for the admin.createTable call. Instead I propose 
splitting the _ensureTableCreated_ method and having another private method 
which just checks for the existence of system catalog and does client-server 
compatibility checks. We can reuse this stub inside _ensureTableCreated_ and 
make sure we don't do this again when called via _createTable_.
    -  If we throw an UpgradeRequiredException in case an upgrade is required, 
the user will not get the connection object right? This also prevents the user 
from being able to run "EXECUTE UPGRADE". Instead I guess we can call 
_setUpgradeRequired_, log an error and return the connection object. This will 
disallow the user from running anything except "EXECUTE UPGRADE" since we have 
this snippet in place:
    `                        
    if (conn.getQueryServices().isUpgradeRequired() && !conn.isRunningUpgrade()
        && stmt.getOperation() != Operation.UPGRADE) {
            throw new UpgradeRequiredException();
    }
    `



> Add a config to conditionally create Phoenix meta tables on first client 
> connection
> -----------------------------------------------------------------------------------
>
>                 Key: PHOENIX-4579
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4579
>             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
(v7.6.3#76005)

Reply via email to