-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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] Remove unlimited memory for file paths #28491
[chore][pkg/stanza] Remove unlimited memory for file paths #28491
Conversation
c2357f3
to
39cd9e5
Compare
39cd9e5
to
a34dd78
Compare
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
In my opinion this is worthy of a changelog. Our field folks really like those logs to make sure they have the right files reporting in, and they will be disoriented with this change. Just adding a bit to the changelog will help them make sense of this change. |
b70a827
to
50fff22
Compare
Can you explain why this is marked as a breaking change? Should users (which users) perform an action when upgrading? |
@astencel-sumo The receiver may now emit the same |
I marked it as breaking based upon @atoulme's comment regarding field teams relying on specific behaviors. I'm open to changing it of course. |
thanks for the explanation, can you please explain with an example circumstance where the receiver may emit same info is emitted. I think you meant this line right. |
Follows #27823
This PR removes a list of all previously seen paths. The problem with this list is twofold. Primarily, it is unlimited in size. Although minor, this could grow indefinitely in some situations. Secondarily, it adds unnecessary complexity to the codebase.
The new approach simply logs a message whenever we open a file with contents which we've not seen in recent memory. Basically, it relies on the same mechanisms we use for tracking files for the purpose of whether or not to read them. While this is a slight change in user-facing functionality, I think it is reasonable considering the benefits.