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

fix: properly propagate sm errors on produce #3671

Merged
merged 1 commit into from
Nov 8, 2023
Merged

fix: properly propagate sm errors on produce #3671

merged 1 commit into from
Nov 8, 2023

Conversation

galibey
Copy link
Contributor

@galibey galibey commented Nov 7, 2023

Currently, errors related to SM on produce requests are not properly propagated to the Fluvio client. It leads to the produce request just hanging and is killed by timeout. This includes when smartmodule does not exist but is used in transformation.

@galibey galibey requested a review from digikata November 7, 2023 13:01
@galibey galibey self-assigned this Nov 7, 2023
Copy link
Contributor

@digikata digikata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

&mut batches,
std::usize::MAX,
ctx.metrics().chain_metrics(),
) {
Ok((result, sm_runtime_error)) => {
if let Some(error) = sm_runtime_error {
return Err(anyhow!("smartmodule runtime error: {error}"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of trying to revert changes from moving to Anyhow, let's try to find out why this was not caught since we may similar problem elsewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not reverting from anyhow. It is just an error has to be put to PartitionWriteResult to be properly handled on the client side. The type that PartitionWriteResult holds is ErrorCode and I removed unnecessary ErrorCode -> Anyhow::Error -> ErrorCode conversions.

@galibey galibey added this pull request to the merge queue Nov 8, 2023
Merged via the queue into infinyon:master with commit 087119e Nov 8, 2023
104 checks passed
@galibey galibey deleted the fix/properly-propagate-sm-errors-on-produce branch November 8, 2023 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants