Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
The LengthDelimitedJournal class allows only a single thread to write to the journal at a time (protected by a synchronized block). If the Thread throws an Exception while writing, it calls the poison() method in order to prevent any other Thread from updating the Repo and causing corruption. However, there is a race condition that exists, where the Thread will exit the synchronized block and then call poison(), which could result in a second Thread entering the synchronized block and updating the Repository, which can corrupt the Repository.
This would only happen in conditions such as an OutOfMemoryError or if the FlowFile Repository runs out of disk space, and even then it won't necessarily occur. But it can, so it needs to be addressed.
Attachments
Issue Links
- links to