Skip to content
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

The configuration for number of query errors in the show queries does not work anymore #9533

Open
spena opened this issue Sep 7, 2022 · 3 comments
Assignees
Labels
bug good first issue P1 Slightly lower priority to P0 ;) streaming-engine Tickets owned by the ksqlDB Streaming Team

Comments

@spena
Copy link
Member

spena commented Sep 7, 2022

Describe the bug
When a query has errors, a list of errors collected is displayed by the SHOW QUERIES EXTENDED or EXPLAIN <query> commands. This list has a config to limit the number of errors displayed. The config is ksql.query.error.max.queue.size and is default to 10. However, the SHOW QUERIES command is displaying more errors than what it is configured and it keeps growing.

Looking at the code, I found the issue was caused by this fix #8875

The queue used to use an EvictionQueue class which evicts queue elements when a size/capacity has been reached. After the previous fix, the capacity is not used anymore, so the queue becomes unbounded on size. It is still time-bounded because the evict() method is called after adding an element. This evict method removes elements that expired in 1 hour window (configured).

Fix:
We should keep the queue bounded to capacity and time (as configured). It is important to keep the queue thread-safe, so maybe the fix should be in the evict() method to remove elements if the queue has reach the configured capacity.

@spena spena added bug good first issue needs-triage streaming-engine Tickets owned by the ksqlDB Streaming Team labels Sep 7, 2022
@gunishmatta
Copy link

I would like to work on this
@spena

@spena
Copy link
Member Author

spena commented Sep 12, 2022

Go head @gunishmatta, take it. We'll assign a priority soon, but you're welcome to start working on this.

@suhas-satish
Copy link
Member

@gunishmatta , assigning this to you. Do you know when you can get to it ? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue P1 Slightly lower priority to P0 ;) streaming-engine Tickets owned by the ksqlDB Streaming Team
Projects
None yet
Development

No branches or pull requests

3 participants