Github user devriesb commented on the issue:

    https://github.com/apache/nifi/pull/2416
  
    I'm glad there's support for making this opt in.  One point on @joewitt 's 
comment : "The claim of a simple fix being available to close the previous gaps 
doesn't appear to be backed with a suggested implementation though it does look 
like you received a good response to why that wasn't feasible." ... the reasons 
given were reasons why @markap14 's original proposed solution wouldn't work, 
not why another solution might not.  For example (as suggested previously in 
email):
    
    > the immediate fix that I see needing is that when building the 
transaction map[1], we need to keep track of the *lowest* encountered corrupt 
transaction. Then, when iterating over the transaction map to rebuild the repo, 
we need to stop when that transaction is reached...  after that we can't trust 
that there are no missing transactions which could lead to repo corruption or 
incorrect state.
    
    This is the relatively simple fix that I believe would be more appropriate 
to the WhriteAheadFlowFileRepository, as it would only prevent a known bug from 
causing corruption, as opposed to a major rewrite.  I never got any response 
suggesting this wouldn't work, rather simply that another solution was 
preferred... which turned out not to be feasible.  At that point, instead of 
circling back and trying to fix the bug, it appears as though the rewrite began.
    
    If there's a reason the author of the original implementation doesn't 
believe my suggestion would work to prevent the observed corruption, I'd be 
happy to take another look.
    
    [1] 
https://github.com/apache/nifi/blob/0f2ac39f69c1a744f151f0d924c9978f6790b7f7/nifi-commons/nifi-write-ahead-log/src/main/java/org/wali/MinimalLockingWriteAheadLog.java#L444



---

Reply via email to