-
Notifications
You must be signed in to change notification settings - Fork 500
Add list_index_stats endpoint #6035
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
base: main
Are you sure you want to change the base?
Conversation
quickwit/quickwit-metastore/migrations/postgresql/25_add-split-size.up.sql
Show resolved
Hide resolved
quickwit/quickwit-metastore/src/metastore/file_backed/file_backed_index/mod.rs
Outdated
Show resolved
Hide resolved
quickwit/quickwit-metastore/src/metastore/file_backed/file_backed_index/mod.rs
Outdated
Show resolved
Hide resolved
quickwit/quickwit-metastore/src/metastore/postgres/metastore.rs
Outdated
Show resolved
Hide resolved
quickwit/quickwit-metastore/src/metastore/file_backed/file_backed_index/mod.rs
Show resolved
Hide resolved
| } | ||
| _ => None, | ||
| }) | ||
| .map(|index_id| (index_id.clone(), None)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why bother with the None? Let's just pass None directly to read_any and make everything else simpler.
| let mut index_stats = Vec::new(); | ||
| for (index_id, incarnation_id_opt) in index_id_incarnation_id_opts { | ||
| match self | ||
| .read_any(&index_id, incarnation_id_opt, |index| index.get_stats()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Behind the hood, this is going to open each metastore file and then fetch the split stats sequentially, which is going to be slow if there are many indexes. Try to parallelize this logic using FuturesUnordered. There are examples in the file.
Description
split_size_bytescolumn insplitstable and create covered indexHow was this PR tested?