[
https://issues.apache.org/jira/browse/NIFI-16344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18115758#comment-18115758
]
ASF subversion and git services commented on NIFI-16344:
--------------------------------------------------------
Commit d323fce0cfbcf258d88c635f9dbc5beb11e642b2 in nifi's branch
refs/heads/main from Bob Paulin
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=d323fce0cfb ]
Merge pull request #11680 from
markap14/codex/nifi-16344-preserve-selective-drop-ordering
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)