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

Close LineRecorder receiver's stream when closing LineRecorder #433

Closed
dr0i opened this issue Dec 27, 2021 · 0 comments · Fixed by #435
Closed

Close LineRecorder receiver's stream when closing LineRecorder #433

dr0i opened this issue Dec 27, 2021 · 0 comments · Fixed by #435
Assignees

Comments

@dr0i
Copy link
Member

dr0i commented Dec 27, 2021

This came up in metafacture/metafacture-playground#25 (comment):

Processing a flux pipeline results in empty data when doing this e.g. with the metafacture-playground, while it works fine when processing it using standalone metafacture-core.
The cause is probably: if the JVM is stopped after processing the streams of the receivers are closed automatically, thus the data is output correctly, while an unstopped JVM (like with metafacture-playground) doesn't close all streams properly (in some cases). Here it is the LineRecorder which doesn't close its receiver.

dr0i added a commit that referenced this issue Dec 27, 2021
Under some circumstances (probably if the JVM is not stopped after processing)
the streams of receivers connected to LineRecorder are not closed, resulting
in empty or missing output data.

- complement test
@dr0i dr0i linked a pull request Dec 27, 2021 that will close this issue
@dr0i dr0i self-assigned this Dec 27, 2021
dr0i added a commit that referenced this issue Dec 30, 2021
Under some circumstances (e.g. if the JVM is not stopped after processing)
the streams of receivers connected to LineRecorder are not closed, resulting
in empty or missing output data.

By switch from "implements ObjectPipe" to "extends DefaultObjectPipe" the "DefaultSender"
is used which implements the Sender interface. This ensures the proper closing of streams.

- complement test
dr0i added a commit that referenced this issue Dec 30, 2021
Under some circumstances (e.g. if the JVM is not stopped after processing)
the streams of receivers connected to LineRecorder are not closed, resulting
in empty or missing output data.

By switching from "implements ObjectPipe" to "extends DefaultObjectPipe" in LineRecorde
the "DefaultSender" is used which implements the Sender interface. This ensures the
proper closing of streams.

- complement test
@dr0i dr0i linked a pull request Dec 30, 2021 that will close this issue
@dr0i dr0i closed this as completed in #435 Jan 3, 2022
dr0i added a commit that referenced this issue Jan 11, 2022
Some "@OverRide" methods used the "public" modifier, which is not necessary. Looking at
the base classes of these classes a "protected" modifier was used, so "protected" seems
to be intentionally.
dr0i added a commit that referenced this issue Jan 11, 2022
Some "@OverRide" methods used the "public" modifier, which is not necessary. Looking at
the base classes of these classes a "protected" modifier was used, so "protected" seems
to be intentionally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant