[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-09 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-3174:
---

Can we hide the properties from the user and have a new option for psql like 
{{bin/psql.py --upgrade}} ? Then we can have a "secret" property which means 
that an upgrade should be performed.

> 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
>
>
> 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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-10 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-3174:
---

Thanks, [~samarthjain]. Another thought that might be an improvement. What if 
we had a new SQL command called EXECUTE UPGRADE or just UPGRADE? Internally, 
this would create a new connection (using our PhoenixConnection copy 
constructor) passing the no upgrade property through.

One issue perhaps - it's very dangerous to allow any SQL to be run if the 
client is new and upgrade hasn't been performed. This is different than an old 
client connecting to a new server because the old client is of course using the 
old code. We do that in a few places on the server side, but we run native 
HBase code (we just happen to need a PhoenixConnection). But generally running 
SQL commands won't work. I think we'd need a guard for this at the Phoenix 
statement level. The UPGRADE statement would be the only whitelisted command.

Thoughts?

> 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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-10 Thread James Taylor (JIRA)

[ 
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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-10 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-3174:
---

But we do run SQL when we're upgrading, though not all SQL would work, at least 
this code path is tested. For example, a CREATE TABLE statement wouldn't 
typically work on a new client that hasn't been upgraded. Maybe the connection 
can be put in a state of "upgrading" and then the above check could be tweaked 
to allow it?

> 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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-10 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-3174:
---

Marked this for 4.9.0 - we don't need it in 4.8.1 because by definition, our 
patch releases have no upgrade code. Would still be good to get this in soon, 
though, IMHO.

> 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
>
> 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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-10 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl commented on PHOENIX-3174:


Could still make the upgrade from 4.7.0 to 4.8.x manual.

> 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
>
> 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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-10 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-3174:
---

bq. Could still make the upgrade from 4.7.0 to 4.8.x manual.
That's true. We can put it in 4.8.1 too if you want it.

> 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
>
>
> 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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-11 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl commented on PHOENIX-3174:


I do like the EXECUTE UPGRADE syntax. Makes it explicit and clean, no options 
to pass to special clients, etc.


> 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
>
>
> 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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-15 Thread James Taylor (JIRA)

[ 
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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-15 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on PHOENIX-3174:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/12828757/PHOENIX-3174_v3_master.patch
  against master branch at commit 2a223adfbeb32f598308da1dc6d3251ee0980d79.
  ATTACHMENT ID: 12828757

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:red}-1 javadoc{color}.  The javadoc tool appears to have generated 
36 warning messages.

{color:red}-1 release audit{color}.  The applied patch generated 1 release 
audit warnings (more than the master's current 0 warnings).

{color:red}-1 lineLengths{color}.  The patch introduces the following lines 
longer than 100:
+updateIndexState(indexTableFullName, env, 
PIndexState.DISABLE, PIndexState.INACTIVE);
+String indexTableFullName = 
SchemaUtil.getTableName(indexPTable.getSchemaName()
+updateIndexState(indexTableFullName, env, 
PIndexState.INACTIVE, PIndexState.ACTIVE);
+private static void updateIndexState(String indexTableName, 
RegionCoprocessorEnvironment env, PIndexState oldState,
+put.addColumn(PhoenixDatabaseMetaData.TABLE_FAMILY_BYTES, 
PhoenixDatabaseMetaData.INDEX_STATE_BYTES,
+put.addColumn(PhoenixDatabaseMetaData.TABLE_FAMILY_BYTES, 
PhoenixDatabaseMetaData.INDEX_DISABLE_TIMESTAMP_BYTES,
+if (code == MutationCode.TABLE_NOT_FOUND) { throw new 
TableNotFoundException(schemaName, indexName); }
+.setMessage(" currentState=" + oldState + ". requestedState=" 
+ newState).setSchemaName(schemaName)
+SQLExceptionCode.UPGRADE_REQUIRED.getSQLState(), 
SQLExceptionCode.UPGRADE_REQUIRED.getErrorCode());
+public PhoenixConnection(PhoenixConnection connection, boolean 
isDescRowKeyOrderUpgrade, boolean isRunningUpgrade) throws SQLException {

 {color:red}-1 core tests{color}.  The patch failed these unit tests:
 
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.MutableIndexToolIT
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.IndexToolIT
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.CsvBulkLoadToolIT
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.AutoPartitionViewsIT
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.AppendOnlySchemaIT
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.iterate.ScannerLeaseRenewalIT
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.ConnectionUtilIT
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.index.AsyncImmutableIndexIT
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.MapReduceIT
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.QueryTimeoutIT

Test results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/579//testReport/
Release audit warnings: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/579//artifact/patchprocess/patchReleaseAuditWarnings.txt
Javadoc warnings: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/579//artifact/patchprocess/patchJavadocWarnings.txt
Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/579//console

This message is automatically generated.

> 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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-16 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-3174:
---

Also, would it be possible to add some tests in UpgradeIT, 
[~samarth.j...@gmail.com]? In particular around verifying that no SQL is 
allowed to be executed when the client and server are new but an upgrade is 
required.

> 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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-19 Thread Samarth Jain (JIRA)

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

Samarth Jain commented on PHOENIX-3174:
---

Ping, [~jamestaylor]. 

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-19 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-3174:
---

Thanks for the patch, [~samarthjain]. One minor nit and one question:
- No need to call optimize here in MetaDataEndPointImpl as there's no tables 
involved in that statement:
{code}
+plan = 
connection.getQueryServices().getOptimizer().optimize(ps, plan);
{code}
- I thought you figured you need the NO_UPGRADE_ATTRIB after all for the cause 
of auto upgrade being set to true?

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-19 Thread Samarth Jain (JIRA)

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

Samarth Jain commented on PHOENIX-3174:
---

Yes, I renamed and moved the attribute to UpgradeUtil#DO_NOT_UPGRADE.

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-19 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-3174:
---

bq. Yes, I renamed and moved the attribute to UpgradeUtil#DO_NOT_UPGRADE
Ah, I see - I missed that. Any reason why you moved the setting of this from 
getConnectionOnServer to getConnection? Looks like QueryUtil.getConnection() is 
called from AbstractBulkLoadTool.loadData(). I think that call should probably 
trigger an upgrade or an error, no?

Also, I remember you mentioned that you'd need to change occurrences of 
DriverManager.getConnection() in MetaDataClient to use the PhoenixConnection 
copy constructor so we don't lose the state of an upgrade being in progress. Is 
that no longer necessary?

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-19 Thread Samarth Jain (JIRA)

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

Samarth Jain commented on PHOENIX-3174:
---

The property is being set in getConnectionOnServer only. 

{code}
/**
 * @return {@link PhoenixConnection} with {@value 
UpgradeUtil#DO_NOT_UPGRADE} set so that we don't initiate metadata upgrade.
 */
public static Connection getConnectionOnServer(Properties props, 
Configuration conf)
throws ClassNotFoundException,
SQLException {
UpgradeUtil.doNotUpgradeOnFirstConnection(props);
return getConnection(props, conf);
}

public static Connection getConnection(Configuration conf) throws 
ClassNotFoundException,
SQLException {
return getConnection(new Properties(), conf);
}
{code}

I didn't realize that there was a copy constructor that I could use to copy 
over the isRunningUpgrade state of the phoenix connection. So in the current 
patch, I had I had it as this:
{code}
try (PhoenixConnection tenantConn = 
DriverManager.getConnection(connection.getURL(), 
props).unwrap(PhoenixConnection.class)) {

tenantConn.setRunningUpgrade(connection.isRunningUpgrade());

{code}

I will switch it over to this instead:
{code}
try (PhoenixConnection tenantConn = new PhoenixConnection(connection, 
connection.getQueryServices(), props))
{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
> Fix For: 4.9.0
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-19 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-3174:
---

+1. Looks good, [~samarthjain] - nice work!

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_master.patch, 
> PHOENIX-3174_v5_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-19 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on PHOENIX-3174:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/12829290/PHOENIX-3174_v5_master.patch
  against master branch at commit e8ffc9c53513309c249aca740620ecc5df48a26a.
  ATTACHMENT ID: 12829290

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

{color:red}-1 patch{color}.  The patch command could not apply the patch.

Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/586//console

This message is automatically generated.

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_master.patch, 
> PHOENIX-3174_v5_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-19 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on PHOENIX-3174:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/12829303/PHOENIX-3174_v5_master.patch
  against master branch at commit e8ffc9c53513309c249aca740620ecc5df48a26a.
  ATTACHMENT ID: 12829303

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

{color:red}-1 javac{color}.  The patch appears to cause mvn compile goal to 
fail .

Compilation errors resume:
[ERROR] COMPILATION ERROR : 
[ERROR] 
/home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java:[2742,1]
 illegal start of expression
[ERROR] 
/home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java:[2742,4]
 illegal start of expression
[ERROR] 
/home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java:[2742,7]
 illegal start of expression
[ERROR] 
/home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java:[2742,15]
 ';' expected
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on 
project phoenix-core: Compilation failure: Compilation failure:
[ERROR] 
/home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java:[2742,1]
 illegal start of expression
[ERROR] 
/home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java:[2742,4]
 illegal start of expression
[ERROR] 
/home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java:[2742,7]
 illegal start of expression
[ERROR] 
/home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java:[2742,15]
 ';' expected
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn  -rf :phoenix-core


Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/587//console

This message is automatically generated.

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_master.patch, 
> PHOENIX-3174_v5_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-19 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on PHOENIX-3174:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/12829304/PHOENIX-3174_v5_master.patch
  against master branch at commit e8ffc9c53513309c249aca740620ecc5df48a26a.
  ATTACHMENT ID: 12829304

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:red}-1 javadoc{color}.  The javadoc tool appears to have generated 
38 warning messages.

{color:red}-1 release audit{color}.  The applied patch generated 1 release 
audit warnings (more than the master's current 0 warnings).

{color:red}-1 lineLengths{color}.  The patch introduces the following lines 
longer than 100:
++ " (PK1 VARCHAR NOT NULL, PK2 VARCHAR, KV1 
VARCHAR, KV2 VARCHAR CONSTRAINT PK PRIMARY KEY(PK1, PK2))");
+final ConnectionQueryServices delegate = 
conn.unwrap(PhoenixConnection.class).getQueryServices();
+ConnectionQueryServices servicesWithUpgrade = new 
DelegateConnectionQueryServices(delegate) {
++ " (k1 VARCHAR NOT NULL, k2 VARCHAR, 
CONSTRAINT PK PRIMARY KEY(K1,K2))");
+"CREATE INDEX " + tableName + "_IDX ON " + 
tableName + " (KV1) INCLUDE (KV2)" );
++ " (PK1 VARCHAR NOT NULL, PK2 VARCHAR, 
KV1 VARCHAR, KV2 VARCHAR CONSTRAINT PK PRIMARY KEY(PK1, PK2))");
+final ConnectionQueryServices delegate = 
conn.unwrap(PhoenixConnection.class).getQueryServices();
+ConnectionQueryServices servicesWithUpgrade = new 
DelegateConnectionQueryServices(delegate) {
+try (ResultSet rs = 
phxConn.createStatement().executeQuery("SELECT * FROM " + tableName)) {
+final ConnectionQueryServices services = 
conn.unwrap(PhoenixConnection.class).getQueryServices();

 {color:red}-1 core tests{color}.  The patch failed these unit tests:
 
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.index.GlobalIndexOptimizationIT

Test results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/588//testReport/
Release audit warnings: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/588//artifact/patchprocess/patchReleaseAuditWarnings.txt
Javadoc warnings: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/588//artifact/patchprocess/patchJavadocWarnings.txt
Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/588//console

This message is automatically generated.

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_master.patch, 
> PHOENIX-3174_v5_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-19 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on PHOENIX-3174:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/12829304/PHOENIX-3174_v5_master.patch
  against master branch at commit e8ffc9c53513309c249aca740620ecc5df48a26a.
  ATTACHMENT ID: 12829304

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:red}-1 javadoc{color}.  The javadoc tool appears to have generated 
38 warning messages.

{color:red}-1 release audit{color}.  The applied patch generated 1 release 
audit warnings (more than the master's current 0 warnings).

{color:red}-1 lineLengths{color}.  The patch introduces the following lines 
longer than 100:
++ " (PK1 VARCHAR NOT NULL, PK2 VARCHAR, KV1 
VARCHAR, KV2 VARCHAR CONSTRAINT PK PRIMARY KEY(PK1, PK2))");
+final ConnectionQueryServices delegate = 
conn.unwrap(PhoenixConnection.class).getQueryServices();
+ConnectionQueryServices servicesWithUpgrade = new 
DelegateConnectionQueryServices(delegate) {
++ " (k1 VARCHAR NOT NULL, k2 VARCHAR, 
CONSTRAINT PK PRIMARY KEY(K1,K2))");
+"CREATE INDEX " + tableName + "_IDX ON " + 
tableName + " (KV1) INCLUDE (KV2)" );
++ " (PK1 VARCHAR NOT NULL, PK2 VARCHAR, 
KV1 VARCHAR, KV2 VARCHAR CONSTRAINT PK PRIMARY KEY(PK1, PK2))");
+final ConnectionQueryServices delegate = 
conn.unwrap(PhoenixConnection.class).getQueryServices();
+ConnectionQueryServices servicesWithUpgrade = new 
DelegateConnectionQueryServices(delegate) {
+try (ResultSet rs = 
phxConn.createStatement().executeQuery("SELECT * FROM " + tableName)) {
+final ConnectionQueryServices services = 
conn.unwrap(PhoenixConnection.class).getQueryServices();

 {color:red}-1 core tests{color}.  The patch failed these unit tests:
 

Test results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/589//testReport/
Release audit warnings: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/589//artifact/patchprocess/patchReleaseAuditWarnings.txt
Javadoc warnings: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/589//artifact/patchprocess/patchJavadocWarnings.txt
Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/589//console

This message is automatically generated.

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_master.patch, 
> PHOENIX-3174_v5_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-19 Thread Hudson (JIRA)

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

Hudson commented on PHOENIX-3174:
-

FAILURE: Integrated in Jenkins build Phoenix-master #1407 (See 
[https://builds.apache.org/job/Phoenix-master/1407/])
PHOENIX-3174 Make minor upgrade a manual step (samarth: rev 
e90feaa31bd928645ecc3596437b822d980939ed)
* (edit) phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java
* (edit) phoenix-core/src/main/antlr3/PhoenixSQL.g
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/query/DelegateConnectionQueryServices.java
* (add) 
phoenix-core/src/main/java/org/apache/phoenix/exception/UpgradeRequiredException.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java
* (add) 
phoenix-core/src/main/java/org/apache/phoenix/parse/ExecuteUpgradeStatement.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataRegionObserver.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java
* (add) 
phoenix-core/src/main/java/org/apache/phoenix/exception/UpgradeInProgressException.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/trace/PhoenixMetricsSink.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/automation/PhoenixMRJobSubmitter.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNodeFactory.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/util/PhoenixRuntime.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java
* (add) 
phoenix-core/src/main/java/org/apache/phoenix/exception/UpgradeNotRequiredException.java
* (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java


> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_master.patch, 
> PHOENIX-3174_v5_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-20 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl commented on PHOENIX-3174:


This is awesome!

One question: In 4.9.x (or 5.x) should we default auto-upgrade to false? (not 
sure what the best answer is, but it's worth considering)

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_master.patch, 
> PHOENIX-3174_v5_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-22 Thread Mujtaba Chohan (JIRA)

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

Mujtaba Chohan commented on PHOENIX-3174:
-

[~samarthjain] After upgrading from 4.7 -> 4.9 and then restoring 
SYSTEM.CATALOG snapshot, re-connecting 4.9 client leads to the following error 
(all default Phoenix properties used):

{noformat}
Error: Operation not allowed since cluster hasn't been upgraded. Call EXECUTE 
UPGRADE. (state=INT13,code=2011)
org.apache.phoenix.exception.UpgradeRequiredException: Operation not allowed 
since cluster hasn't been upgraded. Call EXECUTE UPGRADE. 
at 
org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:275)
at 
org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:267)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at 
org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:266)
at 
org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:1424)
at 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.getColumns(PhoenixDatabaseMetaData.java:529)
 
{noformat}

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_master.patch, 
> PHOENIX-3174_v5_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-22 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-3174:
---

You mean 4.8 client, right, [~mujtabachohan]? Could this be due to the caching 
of the SYSTEM.CATALOG on the server-side, [~samarthjain]? In theory, were you 
expected that it would auto upgrade you back what's on the server side once you 
connect again after restoring the snapshot, Mujtaba?

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_master.patch, 
> PHOENIX-3174_v5_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-22 Thread Mujtaba Chohan (JIRA)

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

Mujtaba Chohan commented on PHOENIX-3174:
-

I mean current head of 4.x (4.9 snapshot). Yes, was expecting it would 
auto-upgrade again.

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_master.patch, 
> PHOENIX-3174_v5_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-22 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-3174:
---

Let's stick to released versions for this upgrade testing, please. Can you try 
with 4.7.0 and 4.8.1? You'll likely get the same error.

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_master.patch, 
> PHOENIX-3174_v5_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-22 Thread Samarth Jain (JIRA)

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

Samarth Jain commented on PHOENIX-3174:
---

[~mujtabachohan] - do you know if restarting the region server that hosts 
SYSTEM.CATALOG after you have restored it using the snapshot helps? 

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_master.patch, 
> PHOENIX-3174_v5_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-22 Thread Samarth Jain (JIRA)

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

Samarth Jain commented on PHOENIX-3174:
---

FWIW, this is a 4.9 feature. So you won't running into this exception on 4.8.1. 

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_master.patch, 
> PHOENIX-3174_v5_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-22 Thread Mujtaba Chohan (JIRA)

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

Mujtaba Chohan commented on PHOENIX-3174:
-

Restart didn't help.

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_master.patch, 
> PHOENIX-3174_v5_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-22 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-3174:
---

bq. FWIW, this is a 4.9 feature. So you won't running into this exception on 
4.8.1.
Ah, yes - I forgot. Was thinking this was a blocker for 4.8.1 RC, but it's not. 
Never mind about using 4.7 against 4.8.1.

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_master.patch, 
> PHOENIX-3174_v5_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-09-23 Thread Mujtaba Chohan (JIRA)

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

Mujtaba Chohan commented on PHOENIX-3174:
-

[~samarthjain] With 4.8.1 RC0 I get the following error while establishing 
connection

{noformat}
Cluster is being concurrently upgraded from 4.7.x to 4.8.x. Please retry 
establishing connection. (state=INT12,code=2010)
org.apache.phoenix.query.ConnectionQueryServicesImpl$UpgradeInProgressException:
 Cluster is being concurrently upgraded from 4.7.x to 4.8.x. Please retry 
establishing connection.
at 
org.apache.phoenix.query.ConnectionQueryServicesImpl$13.acquireUpgradeMutex(ConnectionQueryServicesImpl.java:2778)
at 
org.apache.phoenix.query.ConnectionQueryServicesImpl$13.call(ConnectionQueryServicesImpl.java:2354)
at 
org.apache.phoenix.query.ConnectionQueryServicesImpl$13.call(ConnectionQueryServicesImpl.java:2291)
at 
org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76)
at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2291)
at 
org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:232)
at 
org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:147)
at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:202)
{noformat}

Steps
{noformat}
* 4.7 upgraded to 4.8.0-RC0
* Restore 4.7 SYSTEM.CATALOG snapshot
* Restart server (same error without restart as well)
* Reconnect 4.8.0-RC0 client

HBase version is 0.98.17
{noformat}

> 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
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_master.patch, 
> PHOENIX-3174_v5_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)


[jira] [Commented] (PHOENIX-3174) Make minor upgrade a manual step

2016-10-07 Thread Ankit Singhal (JIRA)

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

Ankit Singhal commented on PHOENIX-3174:


[~samarthjain], couple of things found while testing some other issue.

* Why we are absorbing InitializationException and not throwing back?

* A typo bug:-
{code}
+String schemaName = 
SchemaUtil.getSchemaNameFromFullName(indexTableName);
+String indexName = 
SchemaUtil.getSchemaNameFromFullName(indexTableName);//getTableNameFromFullName
{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
> Fix For: 4.9.0
>
> Attachments: PHOENIX-3174.patch, PHOENIX-3174_v2.patch, 
> PHOENIX-3174_v3_master.patch, PHOENIX-3174_v4_master.patch, 
> PHOENIX-3174_v5_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)