Skip to content
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

merge_apply_inserts/deletes: do metrics work once per table, not per row #1286

Merged
merged 2 commits into from
May 28, 2024

Conversation

Centril
Copy link
Contributor

@Centril Centril commented May 23, 2024

Description of Changes

Rather than doing metrics work once per row in merge_apply_inserts/deletes, just take the per-table lengths and update metrics once per table.

API and ABI breaking changes

None

Expected complexity level and risk

1

@Centril Centril requested a review from Shubham8287 May 23, 2024 09:09
@@ -399,21 +399,25 @@ impl CommittedState {
let pv = table
.delete(blob_store, row_ptr, |row| row.to_product_value())
.expect("Delete for non-existent row!");
Copy link
Contributor

Choose a reason for hiding this comment

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

If this panics, then metrics count in prometheus will permanently become incosistent with table but then we will also have other bigger troubles?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah we'd be in pretty big trouble, as it means that the invariant stated above does not hold.

@Centril Centril added this pull request to the merge queue May 28, 2024
Merged via the queue into master with commit 0e74bee May 28, 2024
7 checks passed
@Centril Centril deleted the centril/merge-bulk-metrics branch May 28, 2024 18:03
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