Skip to content

Connector SDK silently swallows poll errors #3171

@atharvalade

Description

@atharvalade

The handle_messages function in core/connectors/sdk/src/source.rs discards the actual error returned by source.poll():

let Ok(messages) = messages else {
    error!("Failed to poll messages for source connector with ID: {plugin_id}");
    continue;
};

The underlying error is never logged. Any connector failure produces an infinite loop of "Failed to poll messages" with zero context about the root cause. During the Postgres-to-Iceberg benchmark, this cost significant debugging time because the real error (InvalidRecord from a NUMERIC column type mismatch) was invisible until a temporary log line was added inside the connector's own poll() method.

Fix: Log the error: error!("Failed to poll messages for source connector with ID: {plugin_id}: {err:?}");

The same pattern should be checked in the sink SDK path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions