Gabriel39 opened a new pull request, #71191: URL: https://github.com/apache/doris/pull/71191
### Background Fluss lake reads build an embedded Paimon connector from table metadata and catalog lake options. Sibling connectors share the gateway catalog context and are constructed outside standalone catalog CREATE/ALTER validation. ### What problem does this PR solve? Issue Number: None Related PR: #66399 (introduced the Fluss lake synthesis) PR Type: Bugfix Problem Summary: Lake options could overwrite the gateway-selected Paimon catalog type and reach JDBC driver loading without the usual driver policy checks. Reject the reserved type option and check a sibling's declared JDBC driver properties before constructing it. The same driver validator serves ALTER CATALOG and normalizes values the same way as the property binder. For example, a nested lake option setting paimon.catalog.type previously replaced the validated metastore choice; lake resolution now reports that the option is reserved. ### Details - **Frequency:** Always for the conflicting lake option in the local baseline unit tests; no live malicious-driver execution was attempted. - **Root cause:** PaimonSiblingProperties applied an unrestricted overlay after setting the selected type. DefaultConnectorContext then called the sibling factory without the driver validation that standalone catalog statements apply. - **Why existing tests missed it:** PaimonSiblingPropertiesTest covered normal options and unsupported metastore names, but not the alternate type spelling. DefaultConnectorContextSiblingTest checked factory wiring without a JDBC security surface. The Fluss lake override integration suite covered warehouse and metastore changes, but not a reserved type override. The ALTER driver gate tests omitted padded JDBC flavors. - **Fix:** Reject the reserved key at lake property synthesis. Apply the mandatory driver URL rule and the operator secure-path/URL allow-list policy before sibling creation, using the target provider's security surface. Share this validation with ALTER while preserving its touched-property guard. - **Other paths and branches:** The common context also protects other JDBC-bearing siblings. Standalone catalog replay retains its existing validation timing. The introducing Fluss code is absent from the freshly checked branch-3.1, branch-4.0, branch-4.1 and branch-4.2 trees. - **Behavior change:** Conflicting lake type options and sibling drivers rejected by the configured policies now fail before a connector can load the driver. Inactive driver properties remain inert. No configuration or privilege changes. ### Testing Local FE unit runner passed 109 tests in seven classes, with zero failures, errors or skips: lake synthesis and catalog properties, sibling creation and cache ownership, plugin configuration, ALTER driver policies, and JDBC resources. The two lake-option tests and 12 engine policy cases failed on the corresponding unfixed baseline because invalid inputs were accepted. The Fluss lake override integration suite now checks the reserved type through ALTER and a lake query. It was not run locally because the Fluss/MinIO fixture is unavailable. ### Notes for Reviewers Driver policies are checked before the sibling provider can allocate a connector or load a driver. The shared helper keeps ALTER's existing touched-key guard and matches the property binder's whitespace normalization. ### Release note None ### Check List (For Author) - Behavior changed: Yes (see Details). - Does this need documentation: No; this restores the supported metastore and existing driver-policy contracts. - Pre-submission status: Partially verified: local unit tests passed; the Fluss/MinIO integration case was not run. ### AI Disclosure - Tool: Codex (GPT-6). - Generated: implementation, tests and this description. - Human review: Not stated. - Prompts: Analyze the lake sibling issue, fix it on master with driver validation, and submit a pull request. -- 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]
