----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/55634/#review161925 -----------------------------------------------------------
Fix it, then Ship it! ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java (lines 791 - 793) <https://reviews.apache.org/r/55634/#comment233211> OK, this is a really odd question and I'm not going to try to sort it out in my head since you just worked in this area and probably have the answer: Let's say 1.0 to 1.1 happens and a new component is added. Then you downgrade back to 1.0. Now, the component will still be passed in from the invoking method in the collection of target services/components ... but AmbariMetaInfo woudn't have any information for it in the "targetStack", right? So would this throw a NPE? If I'm wrong, please drop. ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java (lines 814 - 817) <https://reviews.apache.org/r/55634/#comment233214> Do you think it's better to simply do: ``` if (!versionAdvertised){ serviceComponentHost.setVersion(StackVersionListener.UNKNOWN_VERSION) } ``` To make this read easier? I know that this would result in more work for the DB, but it's less confusing semantically. Just a thought is all. - Jonathan Hurley On Jan. 17, 2017, 2:59 p.m., Nate Cole wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/55634/ > ----------------------------------------------------------- > > (Updated Jan. 17, 2017, 2:59 p.m.) > > > Review request for Ambari, Dmitro Lisnichenko and Jonathan Hurley. > > > Bugs: AMBARI-19596 > https://issues.apache.org/jira/browse/AMBARI-19596 > > > Repository: ambari > > > Description > ------- > > Steps: > * Install ZKFC using HDP-2.3. > * Register a version for HDP-2.6 > * Start Upgrade > * At first chance, start Downgrade > > In HDP-2.6, ZKFC is marked as {{versionAdvertised=false}}. In HDP-2.6, > {{versionAdvertised=true}}. On downgrade, that component's desired version > should be marked UNKNOWN with upgrade state of NONE. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java > 6f8ebb7 > > ambari-server/src/main/java/org/apache/ambari/server/events/listeners/upgrade/StackVersionListener.java > f5a5b0c > > ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java > 52bf428 > > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java > a702e6f > > ambari-server/src/test/resources/stacks/HDP/2.1.1/services/STORM/metainfo.xml > 79a3130 > > ambari-server/src/test/resources/stacks/HDP/2.2.0/services/STORM/metainfo.xml > PRE-CREATION > > Diff: https://reviews.apache.org/r/55634/diff/ > > > Testing > ------- > > Manual. Automated pending. > > > Thanks, > > Nate Cole > >
