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

Ensure that the payload is consumed on Elements.Data and Elements.Timers when is_last = true #21164

Open
damccorm opened this issue Jun 4, 2022 · 3 comments · Fixed by #25982

Comments

@damccorm
Copy link
Contributor

damccorm commented Jun 4, 2022

BeamFnDataInboundObserver drops the bytes instead of passing it forward on the last message:

data_plane.py drops the timers payload but seems to do the right thing for data:

data_mgr.go drops the data payload (timers don't seem to be supported):

Imported from Jira BEAM-13142. Original Jira may contain additional context.
Reported by: lcwik.

@damccorm
Copy link
Contributor Author

damccorm commented Apr 4, 2023

@lostluck should this be closed or is it just fixed for Go?

@lostluck
Copy link
Contributor

lostluck commented Apr 4, 2023

Ah good catch.

Java is correct: Bytes are not dropped for either data or timers.

Python remains how it was on first filing:
Data is always propagated, timers are only propagated if not last in the In Memory channel:
https://github.com/apache/beam/blob/master/sdks/python/apache_beam/runners/worker/data_plane.py#L363
The GRPC channel just drops both.
https://github.com/apache/beam/blob/master/sdks/python/apache_beam/runners/worker/data_plane.py#L516

I'm still unfamiliar with timers in that respect though (ask me again after I add them to Prism). I'd expect the intent behind this issue is to allow runners to avoid extra messages, which does matter for streaming. That benefit is superseded if the SDK supports the "Elements in ProcessBundle" extensions though, which if the Python SDK supports, then this issue may be obselete.

@lostluck lostluck reopened this Apr 4, 2023
@damccorm damccorm removed this from the 2.47.0 Release milestone Apr 4, 2023
@lostluck
Copy link
Contributor

lostluck commented Dec 4, 2023

It has been determined that Go SDK was breaching FnAPI contract in how it implemented timer writers. By not eagerly creating them, we never had a clear is_last signal for timers for the runner to key off of.

That specific issue is filed in #29605

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants