-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[chore][pkg/stanza/fileconsumer] Remove notion of generation from readers #27396
Closed
djaglowski
wants to merge
0
commits into
open-telemetry:main
from
djaglowski:pkg-stanza-rm-generations
Closed
[chore][pkg/stanza/fileconsumer] Remove notion of generation from readers #27396
djaglowski
wants to merge
0
commits into
open-telemetry:main
from
djaglowski:pkg-stanza-rm-generations
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
djaglowski
force-pushed
the
pkg-stanza-rm-generations
branch
from
October 2, 2023 21:30
3eab8c3
to
99c8246
Compare
@VihasMakwana, I'd appreciate your review on this. Removing this field should allow us to further simplify the |
VihasMakwana
reviewed
Oct 3, 2023
@djaglowski many thanks for this change! It relieves the complexity |
djaglowski
force-pushed
the
pkg-stanza-rm-generations
branch
from
October 3, 2023 12:30
99c8246
to
72e90b6
Compare
VihasMakwana
approved these changes
Oct 3, 2023
songy23
approved these changes
Oct 3, 2023
djaglowski
added a commit
that referenced
this pull request
Oct 4, 2023
…age (#27416) Follows #27396 This PR creates an internal `reader` package and moves directly related structs into it. I intend to clean up this codebase substantially from here. This is just a first step that creates a crude boundary between concerns. There are many exported fields which can later be abstracted, but currently the codebase has many direct interactions. Tests remain in the `fileconsumer` package for now but will be migrated once there are cleaner interfaces to test.
djaglowski
force-pushed
the
pkg-stanza-rm-generations
branch
from
October 4, 2023 00:21
72e90b6
to
5dba9aa
Compare
Merged as part of #27416 |
jmsnll
pushed a commit
to jmsnll/opentelemetry-collector-contrib
that referenced
this pull request
Nov 12, 2023
…age (open-telemetry#27416) Follows open-telemetry#27396 This PR creates an internal `reader` package and moves directly related structs into it. I intend to clean up this codebase substantially from here. This is just a first step that creates a crude boundary between concerns. There are many exported fields which can later be abstracted, but currently the codebase has many direct interactions. Tests remain in the `fileconsumer` package for now but will be migrated once there are cleaner interfaces to test.
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.
The idea behind generations was to allow us some memory of previously known files, but also to forget them eventually so that we do not grow memory indefinitely.
This PR removes the notion of
generation
from thereader
struct. Instead, theManager
struct keeps a fixed slice ofknownFiles
with a capacity of10 * max_concurrent_files
. This size is somewhat arbitrary and could be made configurable in the future. However, we are trading one arbitrary & unexposed limitation for another in order to isolate the responsibilities of thereader
struct independent. This should allow us to move the struct into a dedicated package which can then be hardened.