Skip to content

[Bug] Debezium Postgres source connector failed to restart #25729

@jiangpengcheng

Description

@jiangpengcheng

Search before reporting

  • I searched in the issues and found nothing similar.

Read release policy

  • I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

User environment

  • broker version: 50a31699406a52dfcacd4b5ead09ac5f89e2035d

Issue Description

Debezium Postgres source connector failed to start

Error messages

"commonElementCount": 0,
        "localizedMessage": "org.asynchttpclient.DefaultAsyncHttpClient",
        "message": "org.asynchttpclient.DefaultAsyncHttpClient",
        "name": "java.io.NotSerializableException",


the root stacktrace is here:


            {
                "class": "org.apache.pulsar.io.debezium.SerDeUtils",
                "method": "serialize",
                "file": "SerDeUtils.java",
                "line": 47,
                "exact": false,
                "location": "?",
                "version": "?"
            },
            {
                "class": "org.apache.pulsar.io.debezium.DebeziumSource",
                "method": "open",
                "file": "DebeziumSource.java",
                "line": 113,
                "exact": false,
                "location": "?",
                "version": "?"
            },


and the code is here:


String pulsarClientBuilder = SerDeUtils.serialize(sourceContext.getPulsarClientBuilder());

Reproducing the issue

  1. start pulsar in standalone mode
  2. deploy a test PostgreSql instance
  3. deploy a DebeziumPostgreSql source in the pulsar

Additional information

the root reason is that the all debezium sources will try to serialize ClientBuilder, and which contains a FlowBase object for authentication, but this commit added a protected final AsyncHttpClient httpClient field to the FlowBase class, it makes the ClientBuilder not serializable

we need to make the ClientBuilder serializable again

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugThe PR fixed a bug or issue reported a bug

    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