-
Notifications
You must be signed in to change notification settings - Fork 595
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
feat(common): support switching from pg jdbc to pg native sinks #19703
feat(common): support switching from pg jdbc to pg native sinks #19703
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
2249c24
to
e7ed9d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
src/stream/src/from_proto/sink.rs
Outdated
if !url.contains("jdbc:postgres") { | ||
bail!("invalid jdbc url") | ||
} | ||
|
||
let url = url.replace("jdbc:", ""); | ||
let url = Url::parse(&url).map_err(|e| anyhow!(e).context("failed to parse jdbc url"))?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if !url.contains("jdbc:postgres") { | |
bail!("invalid jdbc url") | |
} | |
let url = url.replace("jdbc:", ""); | |
let url = Url::parse(&url).map_err(|e| anyhow!(e).context("failed to parse jdbc url"))?; | |
if !url.starts_with("jdbc:") { | |
bail!("invalid jdbc url") | |
} | |
let url = Url::parse(&url[5..]).map_err(|e| anyhow!(e).context("failed to parse jdbc url"))?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace jdbc is a lot more explicit, than trimming the string after 5 chars.
e01f6d2
to
0062ecd
Compare
Need review for |
Merge activity
|
e78d259
to
2e302e9
Compare
Hi, there. 📝 Telemetry Reminder:
|
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
We can switch from
jdbc:postgres
to native postgres sink by enabling a config under[streaming.developer]
.See Release Notes below for more details.
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
We support switching from
connector='jdbc'
for jdbc postgres sinks toconnector='postgres'
.This can be done by enabling a streaming developer config: