You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/09/15 20:42:00 UTC
[jira] [Commented] (NIFI-16344) Selective FlowFile drop can reorder swapped queue contents
[ https://issues.apache.org/jira/browse/NIFI-16344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18115756#comment-18115756 ]
ASF subversion and git services commented on NIFI-16344:
--------------------------------------------------------
Commit 36edc2f80cf326f137b2a571419a9185bce1277d in nifi's branch refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=36edc2f80cf ]
NIFI-16344 Preserve Swap File Ordering during Selective Drop
> Selective FlowFile drop can reorder swapped queue contents
> ----------------------------------------------------------
>
> Key: NIFI-16344
> URL: https://issues.apache.org/jira/browse/NIFI-16344
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Mark Payne
> Assignee: Mark Payne
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> {{SwappablePriorityQueue.dropFlowFiles(Predicate)}} can change swap-file ordering when only some swap files contain matching FlowFiles.
> During selective drop, a partially retained swap file is rewritten. Its replacement location is appended to swapLocations. If the rewritten file originally preceded an unchanged swap file, the unchanged file is subsequently swapped in first, violating FIFO ordering.
> Reproduction:
> 1. Create a queue with a swap threshold of 10 and default FIFO ordering.
> 2. Enqueue records numbered 0–29:
> - Active queue: 0–9
> - First swap file: 10–19
> - Second swap file: 20–29
> 3. Selectively drop record 10.
> 4. Poll the queue.
> Expected: Records are returned as 0–9, then 11–29.
> Actual: After 0–9, record 20 is returned because the rewritten first swap file was moved after the second swap file.
> The replacement swap location should retain the original location’s position. Add a regression test using multiple swap files that verifies the complete polling order after selective drop.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)