dekaf: Fix log forwarding dropping some messages #2055
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
I realized we were dropping some log messages on the floor, especially messages that were logged soon before a task exited. I ended up realizing that because the append futures were being directly provided to
tokio::select!
, they will get cancelled if another future in the select resolves first. Per convo w/ @jgraettinger, I refactored the append loop to:MaybeFuture::Future
MaybeFuture
s if they're notDone
orGone
Also per convo w/ @psFried, remove log forwarding from the registry. We never ended up setting a task name so no logs got sent, and it's best if we don't allow external data like from HTTP requests to get into the ops logs.
This change is