PHOENIX-1908 TenantSpecificTablesDDLIT#testAddDropColumn is flaky(Rajeshbabu)
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/d223f2c3 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/d223f2c3 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/d223f2c3 Branch: refs/heads/calcite Commit: d223f2c3997bcd8f85c8dcae3703ceb39036662d Parents: 70de0cd Author: Rajeshbabu Chintaguntla <rajeshb...@apache.org> Authored: Thu Apr 30 19:05:57 2015 +0530 Committer: Rajeshbabu Chintaguntla <rajeshb...@apache.org> Committed: Thu Apr 30 19:05:57 2015 +0530 ---------------------------------------------------------------------- .../java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/d223f2c3/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java index 3ee527a..e613007 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java @@ -1795,7 +1795,7 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso // column, get lock and drop the index. If found as covered // column, delete from index (do this client side?). // In either case, invalidate index if the column is in it - PhoenixConnection connection = QueryUtil.getConnection(env.getConfiguration()).unwrap(PhoenixConnection.class); + PhoenixConnection connection = table.getIndexes().isEmpty() ? null : QueryUtil.getConnection(env.getConfiguration()).unwrap(PhoenixConnection.class); for (PTable index : table.getIndexes()) { try { IndexMaintainer indexMaintainer = index.getIndexMaintainer(table, connection);