8000 Bug: Filter with timestamp using start and end timestamp reveals no results if sorted by NEWEST · Issue #2047 · tchiotludo/akhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bug: Filter with timestamp using start and end timestamp reveals no results if sorted by NEWEST #2047

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mauho opened this issue Jan 23, 2025 · 2 comments
Labels
enhancement New feature or request topic data Kafka Topic data ui Need an ui update

Comments

@mauho
Copy link
mauho commented Jan 23, 2025

We are using AKHQ 0.25.1 with user settings / Topic Data / Sort = NEWEST

The behavior depends on the size of the topic. Working on a topic containing 40GB of data the following applies:
Setting a start AND end timestamp on a topic won't reveal any data. If however start and end timestamp are set, then sorting is switched to OLDEST, the data is fetched as expected.

If only a start timestamp is used results are fetched even on sorting = NEWEST

only start TS   NEWEST   OK  https://address.to/kafka-ui/api/broker-cluster/topic/my-sample-topic/data?sort=NEWEST&partition=All&timestamp=2025-01-06T10%3A25%3A03.000%2B01%3A00
start + end TS  NEWEST   NOK https://address.to/kafka-ui/api/broker-cluster/topic/my-sample-topic/data?sort=NEWEST&partition=All&timestamp=2025-01-06T10%3A25%3A03.000%2B01%3A00&endTimestamp=2025-01-14T10%3A25%3A03.000%2B01%3A00
start + end TS  oldest   OK  https://address.to/kafka-ui/api/broker-cluster/topic/my-sample-topic/data?sort=Oldest&partition=All&timestamp=2025-01-06T10%3A25%3A03.000%2B01%3A00&endTimestamp=2025-01-14T10%3A25%3A03.000%2B01%3A00

The behavior is different on smaller topics. Working on a topic containing 1GB of data, the issue is not present -> start+end time filter works regardless of sorting direction.

Can someone try this on a different system before digging into it any deeper?

Thank you and best Regards
Maurizio

@AlexisSouquiere
Copy link
Collaborator
AlexisSouquiere commented Mar 14, 2025

I think we should prevent the search / newest combination from the UI directly.

  • Searching / oldest makes sense because we poll messages until we reach the end or until we found enough matching messages. It's the "normal" way to read a topic.
  • Searching / newest doesn't make sense because we need to play with the offset to reverse reading the topic, which is inefficient and won't work on large topics

Automatically setting the sort to oldest in case of search in the UI can do the trick. And maybe warn the user when changing the sort

@mikaelol
Copy link
Contributor

We are experiencing the same issue. The problem only arises when we specify an end timestamp, if we specify start timestamp (and no end timestamp) and sort by newest it works even for large topics is our experience. I have created a fix here with the suggestions of @AlexisSouquiere : #2132

There is a related bug: in large topics with sort order newest and end timestamp specified (the topic of this issue), when you click the next page button:

Image

.. you get records, but they are not within the timespan selected. It seems like the query params are not respected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request topic data Kafka Topic data ui Need an ui update
Projects
Status: Backlog
Development

No branches or pull requests

3 participants
0