Add vector_index_compact_read_bytes metric to track compaction input size#30360
Open
keisku wants to merge 1 commit intoyugabyte:masterfrom
Open
Add vector_index_compact_read_bytes metric to track compaction input size#30360keisku wants to merge 1 commit intoyugabyte:masterfrom
vector_index_compact_read_bytes metric to track compaction input size#30360keisku wants to merge 1 commit intoyugabyte:masterfrom
Conversation
✅ Deploy Preview for infallible-bardeen-164bc9 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
1 task
37c1a29 to
9a18f30
Compare
Contributor
Author
|
@spolitov Any chance you could take a look at this PR? |
9a18f30 to
2cfdbbc
Compare
Contributor
Author
|
@hari90 Any chance you could take a look at this PR? |
Contributor
|
@keisku sorry for the delay |
spolitov
approved these changes
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #28578 and follow up on 82e7741#diff-c2003959336de6b22d907014e32e29d09f1d194097b380dd542a91f4d6505680
Set up a testing env.
The metrics are per-tserver, so we need to query the correct node. Find which tserver leads the index tablet.
Verify metrics start at zero.
Metrics remain at 0 after INSERT — 10k vectors is well below the 100k flush threshold (
vector_index_initial_chunk_size), so no chunks reach disk and compaction never triggers.Force vector index compaction.
Note
Low Risk
Adds a new counter and increments it during compaction without changing compaction behavior or persistence logic; main risk is metric miscounting due to relying on chunk
file_size().Overview
Adds a new per-tserver metric,
vector_index_compact_read_bytes, to track total input bytes read during Vector LSM compactions.VectorLSM::DoCompactnow sumsfile_size()across the compaction scope and increments the new counter alongside existingcompact_write_bytes, and unit tests are updated/extended to assert the read metric stays at 0 when no compaction occurs and increases appropriately for both background and manual compactions.Written by Cursor Bugbot for commit 9a18f30. This will update automatically on new commits. Configure here.