Skip to content

Conversation

@Abdul-Andha
Copy link
Contributor

@Abdul-Andha Abdul-Andha commented Dec 19, 2025

Description

  • Add list_index_stats endpoint
  • Add migration 25 to create split_size_bytes column in splits table and create covered index

How was this PR tested?

  • added new metastore tests
  • make test-all

@Abdul-Andha Abdul-Andha requested a review from guilload December 22, 2025 21:47
@Abdul-Andha Abdul-Andha changed the title Add list_index_size_info endpoint Add list_index_stats endpoint Dec 22, 2025
}
_ => None,
})
.map(|index_id| (index_id.clone(), None))
Copy link
Member

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())
Copy link
Member

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.

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.

3 participants