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

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

Looks really good, [~samarthjain]. Here's some feedback:
- Given that we plan to cut an RC for 4.8.1 very soon (on Monday), I think we 
should put this only in 4.9.0 (i.e. 4.x and master branches)
- Did you get a chance to manually test that server-side tracing continues to 
work when we have a newer server with an older client?
- I think it'd be good to start a DISCUSS thread pointing people to this JIRA 
to see if folks think perhaps the default should be to manually upgrade
- I think we should keep the {{if not exists}} here, only because there's a 
small race condition on the table creation. If we're not yet upgraded, it won't 
make a difference - you'll still get the error.
{code}
     private void createTable(Connection conn, String table) throws 
SQLException {
         // only primary-key columns can be marked non-null
         String ddl =
-                "create table if not exists " + table + "( " +
+                "create table " + table + "( " +
{code}
- Minor nit, but couldn't this be written more simply like this?
{code}
+    private boolean traceTableExists(Connection conn, String traceTableName) 
throws SQLException {
+        try {
+            PhoenixRuntime.getTable(conn, traceTableName);
+            return true;
+        } catch (TableNotFoundException e) {
+            return false;
+        }
+    }
{code}

+1 apart from those minor comments.

> 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
>             Fix For: 4.9.0, 4.8.1
>
>         Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.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