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

ASF subversion and git services commented on NIFI-14254:
--------------------------------------------------------

Commit 410dec632303b3327b3c8ce22cca50b560cf0f2c in nifi's branch 
refs/heads/main from pkelly-nifi
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=410dec6323 ]

NIFI-14254 Fixed Event Time Sorting for Provenance Events (#10809)

- Added eventTimestamp field to ProvenanceEventDTO

Co-authored-by: David Handermann <[email protected]>
Signed-off-by: David Handermann <[email protected]>

> Provenance Event sorting by Event Time broken in clustered environment
> ----------------------------------------------------------------------
>
>                 Key: NIFI-14254
>                 URL: https://issues.apache.org/jira/browse/NIFI-14254
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core UI
>    Affects Versions: 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.2
>         Environment: N/A
>            Reporter: René Zeidler
>            Assignee: Paul Kelly
>            Priority: Major
>              Labels: provenance, sorting, timestamp, ui
>         Attachments: image-2025-02-10-10-07-31-585.png, 
> image-2025-02-10-10-22-42-176.png
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> h1. Summary
> Provenance events should be sorted by timestamp, but in a clustered 
> environment they are often jumbled together:
> !image-2025-02-10-10-22-42-176.png!
> The order is correct for the events of each node separately, but is incorrect 
> overall.
> h1. Cause
> The issue is with this line:
> [https://github.com/apache/nifi/blob/6dee8dfae5a177bea06e2b71b8f303b462e8ac32/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/provenance/ui/provenance-event-listing/provenance-event-table/provenance-event-table.component.ts#L264-L268]
> The comment says:
> {quote}// event ideas are increasing, so we can use this simple number for 
> sorting purposes
> // since we don't surface the timestamp as millis
> {quote}
> But this assumption is incorrect. These are the objects for the above events:
> !image-2025-02-10-10-07-31-585.png!
> The eventIds are local to each node, so they cannot be used for sorting 
> events from multiple nodes.
> The eventTime is returned as a formatted string, which is not ideal for 
> sorting either. Since the date format is MM/DD/YYYY (why?), sorting by that 
> string would work unless the events span more than 1 year (which is very 
> unlikely for provenance events).
> However, it would be much nicer if the date was ISO formatted, or better, 
> returned as a Unix timestamp that's formatted in the UI.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to