ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nahappan Somasundaram <nsomasunda...@hortonworks.com>
Subject Re: Review Request 42838: Add upgrade support for Setting feature
Date Tue, 09 Feb 2016 19:00:43 GMT


> On Feb. 9, 2016, 10:40 a.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java,
line 130
> > <https://reviews.apache.org/r/42838/diff/1/?file=1231923#file1231923line130>
> >
> >     This should be idempotent. If anything fails in this file, we should be able
to retry.
> >     Please add a check that the table doesn't already exist.
> >     Before inserting those 2 rows, can check if they already exist.

SchemaUpgradeHelper::main() or at least SchemaUpgradeHelper::executeUpgrade() should be transactional.
If anything fails, we should be able to leave the DB in the state it was found, instead of
a partially upgraded schema, which will  break the system if the upgrade is not run again.
It is cumbersome to verify each upgrade for partial execution before re-running the upgrade.

If an upgrade was successful, re-running the upgrade should exit with a message. I suppose
this is already happening.


- Nahappan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42838/#review118429
-----------------------------------------------------------


On Feb. 3, 2016, 4:36 p.m., Ajit Kumar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42838/
> -----------------------------------------------------------
> 
> (Updated Feb. 3, 2016, 4:36 p.m.)
> 
> 
> Review request for Ambari, Jayush Luniya, Nahappan Somasundaram, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-14912
>     https://issues.apache.org/jira/browse/AMBARI-14912
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Update upgrade catalog 240 and add db schema changes for settings table.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
3414388b9a738a4fc7cc5d0f484fe553cce840ee 
>   ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java
d1d68f24871422936321ad0c940499fc1ef4cbec 
> 
> Diff: https://reviews.apache.org/r/42838/diff/
> 
> 
> Testing
> -------
> 
> Unit testing. Currently my local trunk build is breaking even w/o my changes. I'll run
mvn clean install when it is fixed.
> 
> 
> Thanks,
> 
> Ajit Kumar
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message