[
https://issues.apache.org/jira/browse/FLINK-35806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17864957#comment-17864957
]
Eason Ye commented on FLINK-35806:
----------------------------------
[~leonard]
Sure, I'm glad to.
I'd propose if MongoSource Couldn't discover any collection to read, just throw
an exception to remind the developer of some incorrect configuration message to
avoid this scenario. And maybe should check and add the same logic for other
Sources.
> [Flink-CDC][MongoDB] Add friendly reminder if the configured collectionList
> is wrong
> ------------------------------------------------------------------------------------
>
> Key: FLINK-35806
> URL: https://issues.apache.org/jira/browse/FLINK-35806
> Project: Flink
> Issue Type: Improvement
> Components: Flink CDC
> Affects Versions: cdc-3.1.1
> Reporter: Eason Ye
> Assignee: Eason Ye
> Priority: Minor
>
> When I used the Datastream API to write a Flink Application to transfer
> MongoDB's Data to other storage through the Flink CDC MongoDB Source, I
> didn't configure the correct collectionList. The flink application didn't
> display any warning log or reminder message.
> {code:java}
> MongoDBSource<String> source = MongoDBSource
> .<String>builder()
> .scheme("mongodb+srv")
> ......
> .databaseList("demoDB")
> .collectionList("demoDB.demoCollection")
> .deserializer(new JsonDebeziumDeserializationSchema())
> .startupOptions(StartupOptions.initial())
> .build(); {code}
> I configured the collectionList with "{color:#FF0000}demoCollection{color}"
> instead of "demoDB.demoCollection", so the flink application can't read data
> from MongoDB correctly.
> I hope there could be some logs or reminders for users to figure out the
> incorrect configuration. Or some downgrade strategy to match and find the
> exact Collections.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)