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

DBZ-1738 replaced casts to PgConnection with interface BaseConnection #1227

Merged
merged 1 commit into from Jan 27, 2020

Conversation

mzbyszynski
Copy link
Contributor

This change allows proxied postgres connections to be used by the connector.

io.debezium.connector.postgresql.TypeRegistry already casts connections to BaseConnection but in these other files it is being cast to PgConnection. Java Proxies can be cast to interfaces but not to concrete classes so those break if the connection is being proxied.

See https://issues.redhat.com/browse/DBZ-1738 for more information.

I couldn't see any clear way to add a test for this based on the existing test, but I'm open to suggestions.

…onnection

DBZ-1738 replaced casts to PgConnection with casts to interface BaseConnection
@mzbyszynski
Copy link
Contributor Author

mzbyszynski commented Jan 24, 2020

CI Build is failing on debezium-connector-sqlserver test. I don't think that is related to any changes in this pr?

https://travis-ci.org/debezium/debezium/jobs/641562378#L11813-L11827

The postgres connector build does pass: https://travis-ci.org/debezium/debezium/jobs/641562381#L21357-L21373

@gunnarmorling
Copy link
Member

LGTM, @mzbyszynski! Just one thing: could you rework the commit using an e-mail address associated to your GitHub account? Once that's done, I'll merge it. The test failure for SQL Server is unrelated as you say.

Thanks a lot!

@mzbyszynski
Copy link
Contributor Author

Thanks @gunnarmorling! I just associated that other email address with my github account. Does that work?

@gunnarmorling
Copy link
Member

Yepp, it does. Thanks!

@gunnarmorling gunnarmorling merged commit 507aac0 into debezium:master Jan 27, 2020
@gunnarmorling
Copy link
Member

Applied; thanks, @mzbyszynski!

@gunnarmorling
Copy link
Member

Btw. I'm curious about your tracing approach; could you perhaps describe a bit what you're doing? Is it about tracing spans from Debezium to downstream consumers? Or even source applications causing specific data changes?

@mzbyszynski
Copy link
Contributor Author

@gunnarmorling We're not really sure what traces from the debezium connector will look like, but we're tracing messages in and out of our kafka cluster. We run several different connectors in a single Kafka connect cluster and we use the opentracing special agent to instrument all kafka producers and consumers as well as jdbc operations and some other stuff.

We're hoping to be able to trace cdc operations that trigger other events in our kafka streams application from the connector and out the other side of our cluster. Hope that helps!

@gunnarmorling
Copy link
Member

Thanks, that helps. So we'd like to support tracing out-of-the-box, too, if it makes sense. Maybe there should be an option to add trace ids to change events? Details are a bit blurry to me at this point. There's DBZ-559 for tracking this. If you gain any insights on things where you think Debezium could help you with this task, please let us know by putting a comment to that issue. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants