Skip to content
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] Simplify reader.ValidateOrClose #28419

Conversation

djaglowski
Copy link
Member

This PR changes ValidateOrClose to Validate. The closing behavior is reasonable in theory but become problematic if closing a reader is associated with popping out its metadata (see #27823). Ultimately, it is not necessary because continuing the loop effectively skips over the reader and it is closed shortly thereafter along with all the other files in the slice.

@djaglowski djaglowski force-pushed the pkg-stanza-simplify-reader-validate branch from 959689c to 70c8472 Compare October 23, 2023 20:48
@djaglowski djaglowski marked this pull request as ready for review October 23, 2023 21:20
@djaglowski djaglowski requested review from a team and mx-psi October 23, 2023 21:20
djaglowski added a commit that referenced this pull request Oct 24, 2023
Follows #28419

This discards the separate "roller" and implements the same
functionality directly in `fileconsumer.Manager`.

The motivation for this is to move towards a system of managing files
where each file is managed by only one list at a time. This PR retains
two overlapping slices of readers (`previousPollFiles` and
`knownFiles`), but the functionality does not change. #27823 should get
us the rest of the way there.
@djaglowski
Copy link
Member Author

Merged as part of #28451

@djaglowski djaglowski closed this Oct 24, 2023
sigilioso pushed a commit to carlossscastro/opentelemetry-collector-contrib that referenced this pull request Oct 27, 2023
…metry#28451)

Follows open-telemetry#28419

This discards the separate "roller" and implements the same
functionality directly in `fileconsumer.Manager`.

The motivation for this is to move towards a system of managing files
where each file is managed by only one list at a time. This PR retains
two overlapping slices of readers (`previousPollFiles` and
`knownFiles`), but the functionality does not change. open-telemetry#27823 should get
us the rest of the way there.
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this pull request Nov 12, 2023
…metry#28451)

Follows open-telemetry#28419

This discards the separate "roller" and implements the same
functionality directly in `fileconsumer.Manager`.

The motivation for this is to move towards a system of managing files
where each file is managed by only one list at a time. This PR retains
two overlapping slices of readers (`previousPollFiles` and
`knownFiles`), but the functionality does not change. open-telemetry#27823 should get
us the rest of the way there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants