Skip to content

Add total size bytes gauge for search after cache #5742

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

Merged
merged 6 commits into from
Apr 10, 2025

Conversation

rdettai
Copy link
Collaborator

@rdettai rdettai commented Apr 8, 2025

Description

The search after cache might get pretty big on a system with many scroll / search after queries. This PR adds a way to track its size.

This is part of the global effort to understand memory consumption on searchers.

How was this PR tested?

Would add a test if we could merge #5718 first.

@rdettai rdettai self-assigned this Apr 8, 2025
@rdettai rdettai requested a review from trinity-1686a April 9, 2025 11:38
@@ -191,7 +191,7 @@ impl ClusterClient {
client.leaf_list_terms(request.clone()).await
}

/// Attempts to store a given search context within the cluster.
/// Attempts to store a given key value pair within the cluster.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think this is ever used for anything else than a search/scroll context, nor should it be (that's not a persistent storage)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Unfortunately, everything in the code, including core abstractions and RPCs, wants to make this generic. I just tried to add more consistency to that to help the reader.

I left hints in quickwit-search/src/scroll_context.rs and quickwit-search/src/metrics.rs about how this store is currently used. I also added some extra clarifications to the function contract here.

@rdettai rdettai force-pushed the add-search-after-metric branch from 9b08a70 to bd570a4 Compare April 10, 2025 10:07
@rdettai rdettai force-pushed the add-search-after-metric branch from 689bcf9 to aa08edd Compare April 10, 2025 12:19
@rdettai rdettai enabled auto-merge (squash) April 10, 2025 12:19
@rdettai rdettai merged commit 4b29e49 into main Apr 10, 2025
8 checks passed
@rdettai rdettai deleted the add-search-after-metric branch April 10, 2025 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants