Multi-metrics throttler post v21 cleanup: remove unthrottled entry from topo #17283
+20
−25
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.
Description
Multi metrics throttler was introduced in v21 and was backwards compatible with the v20 single-metric throttler. Compatibility included gRPC, command line flags, etc.
Starting v22, we remove single-metric throttler compatibility. This PR is a small extract of #16915, addressing a single issue: when an app is unthrottled (or expired), we now remove its configuration from topo's
Keyspace
record, as opposed to leaving it there with zero values.This helps maintaining the topo record small and tidy. This could not have been done in v21 for compatibility reasons: the throttler maintains an in-memory representation of the config. Up to v20, it would not remove entries from its in-memory represenation even if those entries did not exist in the config. It would only overwrite based on existing config entries. v21 knows better and removes such entries, which is why it's only safe to submit this PR in v22.
Related Issue(s)
#15624
Checklist
Deployment Notes