[ 
https://issues.apache.org/jira/browse/NIFI-6416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16908302#comment-16908302
 ] 

Joseph Witt commented on NIFI-6416:
-----------------------------------

ah ok fair enough.  for future purposes it is probably cleaner to do a commit 
to revert the original one.  then submit the new clean PR with the bug still in 
it (or fix that prior) and the docs stuff, etc.. then merge again.  but, 
seriously, whatever we're ending up at the same point.

the good thing about having the bug fix alone is now it can be applied to other 
places/tags/etc.. if necessary.

thanks

> WriteAheadFlowFileRepository.swapFlowFilesIn() not removing 
> swapLocationSuffixes
> --------------------------------------------------------------------------------
>
>                 Key: NIFI-6416
>                 URL: https://issues.apache.org/jira/browse/NIFI-6416
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.9.2
>            Reporter: Brandon DeVries
>            Priority: Major
>
> WriteAheadFlowFileRepository maintains a list of swapLocationSuffixes.  This 
> is added to when records are swapped out, and removed from when records are 
> swapped in when the repo is updated[1].  However, the swapFlowFilesIn 
> method[2] appears to be adding instead of removing the specified swap 
> location. 
> Specifically:
> {code:java}
> synchronized (this.swapLocationSuffixes) {
>     this.swapLocationSuffixes.add(normalizeSwapLocation(swapLocation));
> }{code}
> Should be:
> {code:java}
> synchronized (this.swapLocationSuffixes) {
>     this.swapLocationSuffixes.remove(normalizeSwapLocation(swapLocation));
> }{code}
>  
>  
> [1] 
> [https://github.com/apache/nifi/blob/f08c2ee43f39584b7d4e76d61d7d4aaa889068fd/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/WriteAheadFlowFileRepository.java#L372-L377]
> [2]  
> [https://github.com/apache/nifi/blob/f08c2ee43f39584b7d4e76d61d7d4aaa889068fd/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/WriteAheadFlowFileRepository.java#L518]



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to