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

James Taylor commented on PHOENIX-3174:
---------------------------------------

So I think in this case you wouldn't have the no upgrade property, since the 
validation of what could be done would be at a lower level. You could add a new 
UPGRADE enum to PhoenixStatement.Operation, have the 
UpgradeStatement.getOperation() return it, and then add a check in this 
PhoenixStatement code:
{code}
    protected boolean execute(final CompilableStatement stmt) throws 
SQLException {
        if (stmt.getOperation() != Operation.UPGRADE && 
!connection.isClientUpgraded()) {
            throw new UpgradeRequiredException();
        }
        if (stmt.getOperation().isMutation()) {
            executeMutation(stmt);
            return false;
        }
        executeQuery(stmt);
        return true;
    }
{code}

> Make minor upgrade a manual step
> --------------------------------
>
>                 Key: PHOENIX-3174
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3174
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: Samarth Jain
>         Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch
>
>
> Instead of automatically performing minor release upgrades to system tables 
> in an automated manner (on first connection), we should make upgrade a 
> separate manual step. If a newer client attempts to connect to a newer server 
> without the upgrade step having occurred, we'd fail the connection.
> Though not as automated, this would give users more control and visibility 
> into when an upgrade over system tables occurs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to