fix cloudwatch-input query generation#10123
Closed
maxmoehl wants to merge 1 commit intoinfluxdata:masterfrom
maxmoehl:master
Closed
fix cloudwatch-input query generation#10123maxmoehl wants to merge 1 commit intoinfluxdata:masterfrom maxmoehl:master
maxmoehl wants to merge 1 commit intoinfluxdata:masterfrom
maxmoehl:master
Conversation
Contributor
|
Thanks so much for the pull request! |
Contributor
|
👍 This pull request doesn't change the Telegraf binary size 📦 Looks like new artifacts were built from this PR. Expand this list to get them here ! 🐯Artifact URLs |
Contributor
|
!signed-cla |
Contributor
|
Thanks so much for the pull request! |
Contributor
|
@maxmoehl I would love to see this merged next week before we cut 1.21. Can you look at signing the CLA please? |
3 tasks
Author
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Required for all PRs:
Resolves: #10122
getDataQueriesiterates over allfilteredMetricsand takes the address of the metric from that list to store it in thedataQueriesmap. However since go seems to re-use the same object for every iteration of the loop the pointer that is taken always points to the exact same memory location. Due to this theMetricfield will always contain the same pointer (and therefore value) after the for loop is done. The fix is easy and I will provide it as soon as I am done with this issue: the metric struct needs to be copied once to allocate new memory, after that the address can be taken.