ziyanTOP opened a new issue, #664:
URL: https://github.com/apache/doris-flink-connector/issues/664

   ## Problem Summary
   
   When using `mongodb-sync-database`, two connection-related issues occur:
   
   1. **connection-options not passed to MongoDBSourceBuilder**: The internal 
Flink CDC key is `connection.options` (with dot), but users naturally pass 
`connection-options` (with hyphen). Additionally, `.scheme()` and 
`.connectionOptions()` are not called on `MongoDBSourceBuilder`, so these 
parameters are silently ignored.
   
   2. **Unauthorized errors on system collections**: MongoDB system collections 
(e.g. `system.profile`) cannot be accessed without elevated privileges. During 
schema inference, `getSchemaList()` iterates over all collections including 
system collections, causing Unauthorized errors.
   
   ## Proposed Changes
   
   1. Add `getConnectionOptions()` method to try both `connection-options` and 
`connection.options` keys for compatibility. Wire `.scheme()` and 
`.connectionOptions()` to `MongoDBSourceBuilder`.
   
   2. Add a filter to skip collections starting with `system.` during schema 
inference.
   
   ## Checklist
   
   1. Does it affect the original behavior: Yes (fixes broken 
connection-options propagation)
   2. Has unit tests been added: No
   3. Has document been added or modified: No Need
   4. Does it need to update dependencies: No
   5. Are there any changes that cannot be rolled back: No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to