[ https://issues.apache.org/jira/browse/OOZIE-3134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16354633#comment-16354633 ]
Rohini Palaniswamy commented on OOZIE-3134: ------------------------------------------- bq. This issue was originally targeted to fix only scenario 2) Just looked at the patch. All it does is a minor change of adding the entry to the map after the database operation. This should be fine to go in. 1) can be addressed in OOZIE-1980. We started with that jira and patch when he had a database issue. But never got around to wrapping that up and it did not became a priority as we have not run into database issues after that for long (Touch wood). But it is something that has to be fixed. Was not aware of OOZIE-2854 and database update retries. Will take a look at that sometime. > Potential inconsistency between the in-memory SLA map and the Oozie database > ---------------------------------------------------------------------------- > > Key: OOZIE-3134 > URL: https://issues.apache.org/jira/browse/OOZIE-3134 > Project: Oozie > Issue Type: Bug > Reporter: Attila Sasvari > Assignee: Julia Kinga Marton > Priority: Major > Fix For: 5.0.0 > > Attachments: OOZIE-3134-001.patch, OOZIE-3134-002.patch > > > Upon {{SLACalculatorMemory.addRegistration}}, Oozie puts an entry into an > in-memory concurrent hashmap ("slaMap"), and later [persists > it|https://github.com/apache/oozie/blob/50f4b5984832941f1341586e43fd832c293b3275/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java#L380] > 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| > https://github.com/apache/oozie/blob/50f4b5984832941f1341586e43fd832c293b3275/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java#L393]. > 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. -- This message was sent by Atlassian JIRA (v7.6.3#76005)