-
Notifications
You must be signed in to change notification settings - Fork 453
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
[aggregator] Add validation in AddTimedWithStagedMetadatas #3338
Conversation
src/aggregator/aggregator/entry.go
Outdated
@@ -285,6 +288,10 @@ func (e *Entry) AddTimedWithStagedMetadatas( | |||
if err := e.applyValueRateLimit(1, e.metrics.timed.rateLimit); err != nil { | |||
return err | |||
} | |||
// Must have at least one metadata. addTimed furhter confirms that this metadata isn't the default metadata. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"furhter" -> "further"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than nit
Codecov Report
@@ Coverage Diff @@
## master #3338 +/- ##
=========================================
- Coverage 72.4% 72.4% -0.1%
=========================================
Files 1099 1099
Lines 101852 101858 +6
=========================================
- Hits 73806 73801 -5
- Misses 22959 22967 +8
- Partials 5087 5090 +3
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
Ensure that there is at least one provided staged metadata, and that it is not the default staged metadata. Without such checks, the processing can result in working off of an empty `metadata.TimedMetadata{}`, which can `panic()` when processing due to its 0 resolution.
* master: (22 commits) Remove deprecated fields (#3327) Add quotas to Permits (#3333) [aggregator] Drop messages that have a drop policy applied (#3341) Fix NPE due to race with a closing series (#3056) [coordinator] Apply auto-mapping rules if-and-only-if no drop policies are in effect (#3339) [aggregator] Add validation in AddTimedWithStagedMetadatas (#3338) [coordinator] Fix panic in Ready endpoint for admin coordinator (#3335) [instrument] Config option to emit detailed Go runtime metrics only (#3332) [aggregator] Sort heap in one go, instead of iterating one-by-one (#3331) [pool] Add support for dynamic, sync.Pool backed, object pools (#3334) Enable PANIC_ON_INVARIANT_VIOLATED for tests (#3326) [aggregator] CanLead for unflushed window takes BufferPast into account (#3328) Optimize StagedMetadatas conversion (#3330) [m3msg] Improve message scan performance (#3319) [dbnode] Add reason tag to bootstrap retries metric (#3317) [coordinator] Enable rule filtering on prom metric type (#3325) Update m3dbnode-all-config.yml (#3204) [coordinator] Include Type in RollupOp.Equal (#3322) [coordinator] Simplify iteration logic of matchRollupTarget (#3321) [coordinator] Add rollup type to remove specific dimensions (#3318) ...
Ensure that there is at least one provided staged metadata,
and that it is not the default staged metadata.
Without such checks, the processing can result in
working off of an empty
metadata.TimedMetadata{}
,which can
panic()
when processing due to its 0 resolution.What this PR does / why we need it:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing and/or backwards incompatible change?:
Does this PR require updating code package or user-facing documentation?: