-
Notifications
You must be signed in to change notification settings - Fork 456
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
Fix unnecessary and incorrect reallocation #1041
Merged
jpkrohling
merged 14 commits into
open-telemetry:main
from
jaronoff97:fix-allocation-problems
Aug 22, 2022
Merged
Fix unnecessary and incorrect reallocation #1041
jpkrohling
merged 14 commits into
open-telemetry:main
from
jaronoff97:fix-allocation-problems
Aug 22, 2022
Conversation
This file contains 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
…nto fix-allocation-problems
Aneurysm9
reviewed
Aug 18, 2022
secustor
reviewed
Aug 19, 2022
jaronoff97
requested review from
Aneurysm9,
kristinapathak and
secustor
and removed request for
Aneurysm9 and
kristinapathak
August 19, 2022 15:23
Aneurysm9
approved these changes
Aug 19, 2022
secustor
reviewed
Aug 20, 2022
…nto fix-allocation-problems
jaronoff97
force-pushed
the
fix-allocation-problems
branch
from
August 22, 2022 14:18
a2eb58b
to
31c7da3
Compare
secustor
approved these changes
Aug 22, 2022
jpkrohling
approved these changes
Aug 22, 2022
Approving by proxy (code owners approved), and merging. |
6 tasks
ItielOlenick
pushed a commit
to ItielOlenick/opentelemetry-operator
that referenced
this pull request
May 1, 2024
…lemetry#1041) * Resolve bug where TA doesn't allocate all targets * Cleanup cleanup * Changed how targets and collectors are allocated * Comments * added a test * Fix comment spacing * Updated based on feedback * Metrics fix, comment * updated from feedback * Change where metric is recorded
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.
Closes #1038, solves an issue where the allocator re-assigns collectors unnecessarily. This is accomplished by removing the unnecessary logic around allocating targets and collectors as they come in. Previously, the collectors were entirely cleared whenever the
SetCollectors()
method was called. A similar amount of confusion happened with discovered targets where thetargetsWaiting
map which was used for decisions in allocation would be cleared, allowing for a scenario where one target could be assigned to multiple collectors.The new logic combines the
SetWaitingTargets
andprocessWaitingTargets
methods in to one to help clarify the logic. Logic is also simplified forSetCollectors
which simply reassigns all targets discovered after the changed collector list is processed.Before this change:
After this change: