----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/65481/#review199405 -----------------------------------------------------------
core/src/main/java/org/apache/oozie/util/db/FailingDBHelperForTest.java Lines 27-30 (patched) <https://reviews.apache.org/r/65481/#comment279728> If it's visible because of testing, please add `@VisibleForTesting`. core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java Lines 1095 (patched) <https://reviews.apache.org/r/65481/#comment279729> Please add a more self-descriptive name like `testWhenSLARegistrationIsAddedBeanIsStoredCorrectly()`. core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java Lines 1104 (patched) <https://reviews.apache.org/r/65481/#comment279730> Please add a more self-descriptive name like `testWhenSLARegistrationIsAddedAndAllDBCallsAreDisruptedBeanIsNotStored()`. core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java Lines 1123 (patched) <https://reviews.apache.org/r/65481/#comment279731> Please add a more self-descriptive name like `testWhenSLARegistrationIsUpdatedBeanIsStoredCorrectly()`. core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java Lines 1141 (patched) <https://reviews.apache.org/r/65481/#comment279732> Please add a more self-descriptive name like `testWhenSLARegistrationIsUpdatedAndAllDBCallsAreDisruptedBeanIsNotStored()`. core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java Lines 1179 (patched) <https://reviews.apache.org/r/65481/#comment279733> Use a more descriptive name as `SLARegistrationDmlPredicate`. core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java Lines 1185 (patched) <https://reviews.apache.org/r/65481/#comment279734> Please use Guava's [`Strings#isNullOrEmpty()`](https://google.github.io/guava/releases/23.0/api/docs/com/google/common/base/Strings.html#isNullOrEmpty-java.lang.String-) instead. - András Piros On Feb. 19, 2018, 2:14 p.m., Kinga Marton wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/65481/ > ----------------------------------------------------------- > > (Updated Feb. 19, 2018, 2:14 p.m.) > > > Review request for oozie, András Piros and Attila Sasvari. > > > Repository: oozie-git > > > Description > ------- > > Upon SLACalculatorMemory.addRegistration, Oozie puts an entry into an > in-memory concurrent hashmap ("slaMap"), and later persists it in the Oozie > database. > However, if there is a failure during the database operation, a > JPAExecutorException is thrown, and the entry is not removed from the SLA map. > It may introduce inconsistency between the Oozie database and the SLA map. > To prevent this, a rollback mechanism (with proper logging) should be > implemented. It would also make sense to do more sanity/consistency check in > the Oozie server. > > > Diffs > ----- > > core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java ef019e73 > > core/src/main/java/org/apache/oozie/util/db/AlwaysFailingHSQLDriverMapper.java > PRE-CREATION > core/src/main/java/org/apache/oozie/util/db/FailingConnectionWrapper.java > 0e310253 > core/src/main/java/org/apache/oozie/util/db/FailingDBHelperForTest.java > PRE-CREATION > core/src/main/java/org/apache/oozie/util/db/FailingHSQLDBDriverWrapper.java > fe9f08b1 > core/src/main/java/org/apache/oozie/util/db/FailingMySQLDriverWrapper.java > f0e2b181 > core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java > ee906f45 > > > Diff: https://reviews.apache.org/r/65481/diff/4/ > > > Testing > ------- > > > Thanks, > > Kinga Marton > >
