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

Change broker rewrite callback to handle resolution too #17

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

benesch
Copy link
Member

@benesch benesch commented Jul 1, 2024

Instead of offering a callback that allows rewriting broker addresses before DNS resolution, offer a callback that handles the entire DNS resolution process. This is strictly more powerful than the previous callback. Users can still rewrite addresses before DNS resolution, if they so choose, but they can also plug in their own DNS resolver, or inspect and/or modify addresses after DNS resolution.

@benesch
Copy link
Member Author

benesch commented Jul 1, 2024

@rjobanp, FYI there's no much test coverage in this repository (and CI is broken here anyway), so I pulled this into a Materialize PR: MaterializeInc/materialize#27965. That should give us tons of test coverage of this new code path.

Copy link

@rjobanp rjobanp left a comment

Choose a reason for hiding this comment

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

I am pretty unfamiliar with the C ffi pointer management, but reading through the logic makes sense to me and testing in MZ will give confidence 👍🏽

src/client.rs Outdated Show resolved Hide resolved
src/client.rs Show resolved Hide resolved
Instead of offering a callback that allows rewriting broker addresses
before DNS resolution, offer a callback that handles the entire DNS
resolution process. This is strictly more powerful than the previous
callback. Users can still rewrite addresses before DNS resolution, if
they so choose, but they can also plug in their own DNS resolver, or
inspect and/or modify addresses after DNS resolution.
@benesch benesch merged commit 1e27332 into master Jul 1, 2024
1 of 10 checks passed
@benesch benesch deleted the resolve-broker-addr branch July 1, 2024 19:45
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.

2 participants