Skip to content

Conversation

@stevencartavia
Copy link
Contributor

Update the metric from get to subscribe in cleanup_waiters and increment it in batches

self.metrics
.subscribe
.inc_by(Status::Dropped, dropped_count as u64);
}
Copy link

Choose a reason for hiding this comment

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

Bug: Metric count truncation on wide platforms

dropped_count is a usize but gets cast with dropped_count as u64 for subscribe.inc_by. On platforms where usize is wider than 64 bits (or with extremely large waiter lists), this cast truncates and silently undercounts dropped waiters in metrics.

Fix in Cursor Fix in Web

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.

1 participant