-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/64950/
-----------------------------------------------------------
(Updated Jan. 4, 2018, 4:44 p.m.)
Review request for Ambari, Jonathan Hurley and Nate Cole.
Bugs: AMBARI-22723
https://issues.apache.org/jira/browse/AMBARI-22723
Repository: ambari
Description
-------
AMBARI-21728 and AMBARI-22469 make the upgrade broken in case of several
upgrade tries, failing to follow the Idempotent upgrade paradigm.
Issue is with:
{code}
protected void executeDDLUpdates() throws AmbariException, SQLException {
Integer currentVersionID = getCurrentVersionID(); <----------------------
dropBrokenFK();
updateServiceComponentDesiredStateTable(currentVersionID);
<----------------------
updateServiceDesiredStateTable(currentVersionID); <----------------------
addSelectedCollumsToClusterconfigTable();
updateHostComponentDesiredStateTable();
updateHostComponentStateTable();
dropStaleTables(); <----------------------
updateUpgradeTable();
createUpgradeHistoryTable();
updateRepositoryVersionTable();
renameServiceDeletedColumn();
addLegacyColumn();
expandUpgradeItemItemTextColumn();
addViewUrlPKConstraint();
removeStaleConstraints();
}
{code}
{{getCurrentVersionID()}} trying to query non-existing table and failing whole
upgrade
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java
391a6f567e
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
6ba1671cdf
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
e93cd1303a
Diff: https://reviews.apache.org/r/64950/diff/1/
Testing (updated)
-------
mvn clean test
live cluster check
Thanks,
Dmitro Lisnichenko