-
Notifications
You must be signed in to change notification settings - Fork 590
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(cdc): Add MongoDB CDC Source #14966
Conversation
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
9425213 | Triggered | Generic Password | 8433b84 | ci/scripts/regress-test.sh | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Our GitHub checks need improvements? Share your feedbacks!
Good job!
|
I think we do. The underlying debezium connector can support replica set and shared cluster deployment. User just need to provide the corresponding connection string to us:
Yeah, we can omit it from the sql. |
Please forbid unnecessary attributes in the final syntax, since a direct mongodb source does not require them. |
java/connector-node/risingwave-connector-service/src/main/resources/mongodb.properties
Show resolved
Hide resolved
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.
Tried my best reviewing the code. Still some code to refine, but overall LGTM. Please find engineers to approve this PR.
dd8d949
to
a3f3f54
Compare
...connector-service/src/main/java/com/risingwave/connector/source/common/MongoDbValidator.java
Outdated
Show resolved
Hide resolved
@@ -218,9 +218,12 @@ impl Parser { | |||
if connector.contains("-cdc") { |
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.
Recommend parsing all possible values (mongodb-cdc, postgres-cdc, mysql-cdc) to enum
and use equal conditions here. This code looks too lossy, and it's hard to say what will happen if I pass some strange values ending with -cdc
.
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.
leave to the PR that adding e2e tests.
@fuyufjh @hzxa21 @tabVersion PTAL again, I‘d like to get the basic functionality merge first. |
LOG.error( | ||
"engine#{} terminated with error. message: {}", | ||
sourceId, | ||
message, | ||
error); | ||
if (error != null) { | ||
responseObserver.onError(error); | ||
} |
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.
Any motivation for this change? In what situation will it failed with error == null
?
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.
For defensive of nullptr and match the implementation of the following create(DbzConnectorConfig config, long channelPtr)
method.
Actually newCdcEngineRunner
only used in unit test right now, since we replaced with embeded jvm.
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. Thanks!
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
mongodb-cdc
connector to support capturing cdc events from MongoDBDebeziumMongoJsonParser
to handle message key, because we need to extract the_id
field for DELETE eventdev
databaseUnit test and e2e tests will be added in follow up #15003
#14759
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
mongodb-cdc
connector to support capturing cdc events from MongoDB