Skip to content

Report rewritten blocks telemetry#14

Open
jason-rl wants to merge 1 commit intomainfrom
jason/block_rewrite_stats
Open

Report rewritten blocks telemetry#14
jason-rl wants to merge 1 commit intomainfrom
jason/block_rewrite_stats

Conversation

@jason-rl
Copy link

@jason-rl jason-rl commented Mar 7, 2026

No description provided.

@jason-rl jason-rl requested a review from adam-rl March 10, 2026 21:57
@jason-rl jason-rl marked this pull request as ready for review March 10, 2026 21:57

// Count blocks that will be overwritten (rewritten)
uint64_t rewritten = 0;
auto check_it = mapping.lower_bound(m);
Copy link

Choose a reason for hiding this comment

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

So this is in the hot path, serving block reads, and we've introduced another lookup.

Should this be somehow gated with a preprocessor guard, and only enabled when building the overlaybd-commit tool?

return;
}

it = remove_partial_overlap(it, m.offset, m.length); // first one (there must be)
Copy link

Choose a reason for hiding this comment

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

Could we instead have this method return how many blocks were removed?

This code is already figuring out what was overwritten, it can just report that.

Copy link

@adam-rl adam-rl left a comment

Choose a reason for hiding this comment

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

Some perf / duplication concerns.

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