Gabriel39 opened a new pull request, #70249:
URL: https://github.com/apache/doris/pull/70249

   ### Background
   
   Doris loads FE connectors in isolated plugin directories, while BE native 
clients are built through the shared third-party toolchain. A native MongoDB 
connector needs the synchronous Java client for FE metadata access and the C 
driver/BSON libraries for BE reads.
   
   ### What problem does this PR solve?
   
   Issue Number: None
   Related PR: None
   PR Type: Release/Dependency
   
   Problem Summary:
   
   Prepare the client dependencies and build outputs needed for native MongoDB 
catalog development. Build libmongoc and libbson together, expose explicit BE 
CMake targets, and package an isolated FE dependency bundle with aligned 
MongoDB jars and optional compression providers. The bundle is staged as an 
archive until a connector provider is implemented; no catalog or scanner is 
registered by this change.
   
   ### Details
   
   - **Change map:** 252 added lines of build configuration/dependency 
declarations, 189 lines of license metadata/notices, and 28 lines of README. No 
runtime query code, tests, or generated sources are changed.
   - **Versions:** MongoDB C Driver/libbson 2.5.7; Java sync/core/BSON/record 
codec 5.14.0; snappy-java 1.1.10.5 from existing FE dependency management; 
zstd-jni 1.5.7-25.
   - **Upstream changes:** Pin the official [C driver 
release](https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.7) and 
[Java driver 
release](https://github.com/mongodb/mongo-java-driver/releases/tag/r5.14.0). 
Java compression providers are optional SDK dependencies and are included 
explicitly so configured compressor URI options work for FE metadata access as 
well as BE reads.
   - **Compatibility:** Use Doris-managed OpenSSL, Cyrus SASL, Snappy, zstd and 
zlib; enable SRV and bundled utf8proc. Native archives are PIC/static. Checked 
initial-cache paths and restricted pkg-config lookup prevent host dependencies 
from being selected. The Java BOM is module-local, logging remains 
host-provided, and the BE targets stay outside `COMMON_THIRDPARTY` until 
consumed by a reader.
   - **Rollback:** Revert the dependency registration and bundle staging; this 
change introduces no persisted catalog state.
   
   ### Testing
   
   Locally on Linux x86_64:
   
   - `bash thirdparty/build-thirdparty.sh -j 8 mongo_c_driver`: builds and 
installs both static libraries successfully.
   - A standalone CMake/C++ consumer links the actual BE `mongoc2`/`bson2` 
targets and runs BSON/ObjectId, client lifecycle and snapshot-session-options 
smoke checks. Required TLS/SASL/SRV/compression feature macros are enabled.
   - An empty managed dependency prefix fails configuration instead of 
selecting host OpenSSL.
   - `mvn -f fe/pom.xml -pl :fe-connector-mongodb -am package -DskipTests 
-Dskip.doc=true -Dmaven.build.cache.enabled=false`: succeeds, including FE 
Checkstyle and the connector import gate. No module unit tests are claimed.
   - Inspect the produced archive: exactly the six intended runtime jars, 
aligned MongoDB versions, and no logging binding. Run Java raw 
BSON/read-options smoke checks and Snappy/Zstd JNI compression round trips 
against those jars.
   - Execute the added `build.sh` staging block and verify the copied archive 
hash and absence of an auto-loaded MongoDB plugin directory.
   - Shell syntax and `git diff --check` pass.
   
   The full `build.sh --fe` build was not completed: the existing third-party 
installation lacks `libpaimon_c.a` and `paimon_rust/paimon.h`, so its preflight 
starts an unrelated full third-party rebuild. That rebuild was stopped; the 
scoped validations above completed. Other platform and full-build coverage 
remain for CI.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Behavior changed: No query behavior change; MongoDB client dependency 
artifacts are added to build outputs.
   - Does this need documentation: No user-facing documentation yet; the 
dependency module README explains the preparation stage.
   - Pre-submission status: Partially verified: dependency builds, packaging 
and smoke checks pass; full FE build and other platforms remain for CI.
   
   ### AI Disclosure
   
   - Tool: OpenAI Codex.
   - Generated: Build configuration, dependency module, README, and this 
description. License notices are copied from upstream.
   - Human review: Pending maintainer review; agent self-review completed.
   


-- 
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