AMBARI-15737. Ambari DB schema upgrade fails with ORA-01408 error (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4bc6a52a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4bc6a52a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4bc6a52a Branch: refs/heads/branch-2.2 Commit: 4bc6a52a4187c7314486ef16245591cae7cbb527 Parents: 8b49b71 Author: Andrew Onishuk <[email protected]> Authored: Wed Apr 6 18:58:07 2016 +0300 Committer: Andrew Onishuk <[email protected]> Committed: Wed Apr 6 18:58:07 2016 +0300 ---------------------------------------------------------------------- .../java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java | 2 +- .../org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/4bc6a52a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java index 7021a46..3522291 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java @@ -293,7 +293,7 @@ public class UpgradeCatalog222 extends AbstractUpgradeCatalog { } protected void updateHostRoleCommands() throws SQLException { - dbAccessor.createIndex("idx_hrc_status", "host_role_command", "status", "role"); + dbAccessor.createIndex("idx_hrc_status_role", "host_role_command", "status", "role"); } protected void updateAMSConfigs() throws AmbariException { http://git-wip-us.apache.org/repos/asf/ambari/blob/4bc6a52a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java index 7321f69..b0bd736 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java @@ -587,7 +587,7 @@ public class UpgradeCatalog222Test { @Test public void testUpdateHostRoleCommands() throws Exception { final DBAccessor dbAccessor = createNiceMock(DBAccessor.class); - dbAccessor.createIndex(eq("idx_hrc_status"), eq("host_role_command"), eq("status"), eq("role")); + dbAccessor.createIndex(eq("idx_hrc_status_role"), eq("host_role_command"), eq("status"), eq("role")); expectLastCall().once(); replay(dbAccessor);
