Skip to content

fix: skip empty output buffers to avoid empty HTTP/2 DATA frames#115

Merged
tillrohrmann merged 1 commit into
restatedev:mainfrom
tillrohrmann:issues/114
Jun 11, 2026
Merged

fix: skip empty output buffers to avoid empty HTTP/2 DATA frames#115
tillrohrmann merged 1 commit into
restatedev:mainfrom
tillrohrmann:issues/114

Conversation

@tillrohrmann

Copy link
Copy Markdown
Contributor

take_output returns an empty buffer when there is nothing to send but the output stream is not closed (e.g. while replaying already-completed entries on resume-after-suspend). The SDK forwarded this empty buffer to the response channel unconditionally, emitting one empty HTTP/2 DATA frame per replayed await. Proxies such as Envoy terminate connections with more than one consecutive empty-payload frame, so suspended invocations never resumed.

Guard the three send sites (async_result_poll, select_poll, consume_to_end) to skip empty buffers. The EOF arm is unchanged, so a closed output still maps to UnexpectedOutputClosed.

Fixes #114

take_output returns an empty buffer when there is nothing to send but
the output stream is not closed (e.g. while replaying already-completed
entries on resume-after-suspend). The SDK forwarded this empty buffer to
the response channel unconditionally, emitting one empty HTTP/2 DATA
frame per replayed await. Proxies such as Envoy terminate connections
with more than one consecutive empty-payload frame, so suspended
invocations never resumed.

Guard the three send sites (async_result_poll, select_poll,
consume_to_end) to skip empty buffers. The EOF arm is unchanged, so a
closed output still maps to UnexpectedOutputClosed.

Fixes restatedev#114

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tillrohrmann tillrohrmann merged commit 845fe1b into restatedev:main Jun 11, 2026
3 checks passed
@tillrohrmann tillrohrmann deleted the issues/114 branch June 11, 2026 07:43
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty HTTP/2 frames when invocation is resumed

2 participants