ref(grouping): Add sample rate for grouphash metadata backfill #85127
+27
−4
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.
This adds a new option,
grouping.grouphash_metadata.backfill_sample_rate
, to control the rate at which we add or update grouphash metadata for existing grouphashes. It also adds and switches to using a helper function,should_handle_grouphash_metadata
, which checks both the existing killswitch and feature flag and the new option in cases where the grouphash already exists.There's not yet any code to do the adding/updating (and the option defaults to
0
), so this doesn't change any behavior*, but it does set us up for when said code is added.*This is only 99.9% true. Technically there is a theoretical behavior change, in that the one bit of updating we already do (to the grouping config) is now subject to the sample rate, which is currently
0
. That said, we've been on the same grouping config since we started collecting grouphash metadata, so there aren't any records to update. So a thing that never happens now actually can't happen (at least until we up the sample rate), but in the real world that doesn't actually make things any different.