PHOENIX-3537 Clients not able to resolve sequences when the SYSTEM.SEQUENCE table is salted
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/7a1f971b Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/7a1f971b Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/7a1f971b Branch: refs/heads/calcite Commit: 7a1f971b598ec8b45023e3866fb03009ff345315 Parents: d9d53bc Author: Samarth <samarth.j...@salesforce.com> Authored: Thu Dec 15 15:42:12 2016 -0800 Committer: Samarth <samarth.j...@salesforce.com> Committed: Thu Dec 15 15:42:12 2016 -0800 ---------------------------------------------------------------------- .../org/apache/phoenix/query/ConnectionQueryServicesImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/7a1f971b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java index 0c67af6..f893aef 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java @@ -2464,7 +2464,9 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement private void createOtherSystemTables(PhoenixConnection metaConnection) throws SQLException { try { metaConnection.createStatement().execute(QueryConstants.CREATE_SEQUENCE_METADATA); - } catch (TableAlreadyExistsException ignore) {} + } catch (TableAlreadyExistsException e) { + nSequenceSaltBuckets = getSaltBuckets(e); + } try { metaConnection.createStatement().execute(QueryConstants.CREATE_STATS_TABLE_METADATA); } catch (TableAlreadyExistsException ignore) {}