----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/65481/#review196901 -----------------------------------------------------------
core/src/main/java/org/apache/oozie/util/db/FailingConnectionWrapper.java Line 58 (original), 56 (patched) <https://reviews.apache.org/r/65481/#comment276868> Using Predicate like that creates a raw-type warning core/src/main/java/org/apache/oozie/util/db/FailingHSQLDBDriverWrapper.java Lines 34 (patched) <https://reviews.apache.org/r/65481/#comment276858> super() is implicit, not needed to call directly core/src/main/java/org/apache/oozie/util/db/FailingHSQLDBDriverWrapper.java Lines 40 (patched) <https://reviews.apache.org/r/65481/#comment276863> Predicate is generic interface. I believe this code creates an unchecked raw-type warning. core/src/main/java/org/apache/oozie/util/db/ThreadVariables.java Lines 23-37 (patched) <https://reviews.apache.org/r/65481/#comment276860> Agree with Andras. Using ThreadLocal is very confusing here. If it's not possible to reload/re-instantiate the class that uses this predicate, we're still better off with a simple helper class that has a static Predicate field which can be set/unset. core/src/main/java/org/apache/oozie/util/db/ThreadVariables.java Lines 24 (patched) <https://reviews.apache.org/r/65481/#comment276865> Same here about Predicate, it should be Predicate<T> or Predicate<?> depending on your needs. core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java Lines 1176 (patched) <https://reviews.apache.org/r/65481/#comment276862> Try conf.setInt() - Peter Bacsko On febr. 6, 2018, 2:43 du, Kinga Marton wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/65481/ > ----------------------------------------------------------- > > (Updated febr. 6, 2018, 2:43 du) > > > 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/FailingHSQLDBDriverWrapper.java > fe9f08b1 > core/src/main/java/org/apache/oozie/util/db/FailingMySQLDriverWrapper.java > f0e2b181 > core/src/main/java/org/apache/oozie/util/db/ThreadVariables.java > PRE-CREATION > core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java > ee906f45 > > > Diff: https://reviews.apache.org/r/65481/diff/2/ > > > Testing > ------- > > > Thanks, > > Kinga Marton > >
