> On Feb. 10, 2017, 2:18 p.m., Nate Cole wrote: > > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java, > > lines 715-729 > > <https://reviews.apache.org/r/56540/diff/1/?file=1629358#file1629358line715> > > > > This is strange - why not make the DatabaseConsistencyCheckHelper do > > this exception handling/logic and call it directly instead of having yet > > another method call in AmbariServer? Separation of concerns would be > > helpful.
I agree with this finding. I copied existing behavior that's why it is here. I'll move it to DB checker. > On Feb. 10, 2017, 2:18 p.m., Nate Cole wrote: > > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java, > > lines 724-726 > > <https://reviews.apache.org/r/56540/diff/1/?file=1629358#file1629358line724> > > > > Use logging here, not System.out.println(...) I copied existing behavior. I think the reason why it is here that the python script checks the standard out, so the intention is to make sure this line appears there, irrespectively of the logging config. - Balázs Bence ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/56540/#review165122 ----------------------------------------------------------- On Feb. 10, 2017, 12:21 p.m., Balázs Bence Sári wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/56540/ > ----------------------------------------------------------- > > (Updated Feb. 10, 2017, 12:21 p.m.) > > > Review request for Ambari, Attila Doroszlai, Attila Magyar, Jonathan Hurley, > Laszlo Puskas, Oliver Szabo, Sandor Magyari, and Sebastian Toader. > > > Bugs: AMBARI-19957 > https://issues.apache.org/jira/browse/AMBARI-19957 > > > Repository: ambari > > > Description > ------- > > Postgres allows multiple schemas on a database user's search path, that is > users can query from tables in different schemas without the need of > prefixing the tables in the query. > > This can lead to confusion when after an unsuccessful upgrade DBA's restore > the tables into a different schema (e.g. public) to Ambari's configured one. > As a result, Ambari server may see different data than indended. > > New consistency checks on server startup warn the user in such situations. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java > 7aa8652 > > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java > 1704546 > ambari-server/src/main/python/ambari_server_main.py 7a21333 > > ambari-server/src/test/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelperTest.java > f73562d > > Diff: https://reviews.apache.org/r/56540/diff/ > > > Testing > ------- > > - Wrote new unit tests > - Run all tests for ambari-server (all passed) > - Performed manual testing > > > Thanks, > > Balázs Bence Sári > >
