Skip to content

Update mongo-c-driver to 2.3.0#104300

Merged
Algunenano merged 1 commit intomasterfrom
bump-mongo-c-driver-2.3.0
May 7, 2026
Merged

Update mongo-c-driver to 2.3.0#104300
Algunenano merged 1 commit intomasterfrom
bump-mongo-c-driver-2.3.0

Conversation

@Algunenano
Copy link
Copy Markdown
Member

Bumps mongo-c-driver from 2.2.3 to 2.3.0 to pick up the CDRIVER-6083 series, which refactors the reply ownership contract in the cluster opmsg path and addresses a LeakSanitizer Direct leak of 128 byte(s) reported from bson_copy_to in _mongoc_cluster_run_opmsg_recv. The leak surfaces flakily as test_dictionaries_all_layouts_separate_sources/test_mongo.py::test_simple_ssl.

CC @thevar1able — follow-up to #102842, which calls mongoc_cleanup from ~MongoDBInstanceHolder and addressed libmongoc global leaks but did not free this per-cursor bson_t reply buffer.

Submodule pointer is on the ClickHouse/mongo-c-driver branch ClickHouse/2.3.0, which carries the existing ClickHouse patches (strerror_l fix for musl/FreeBSD, mlib_have_posix_clocks detection) on top of upstream tag 2.3.0.

The mongo-cxx-driver wrapper does not need to change: r4.1.4 declares MONGOC_REQUIRED_VERSION 2.0.0.

CI report where the leak was observed (PR #104231 is unrelated to this change): https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104231&sha=ba6d691ecc3e9ddd529b269609ff6a98352d6cc5&name_0=PR&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%20old%20analyzer%2C%203%2F6%29&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%20old%20analyzer%2C%203%2F6%29

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Bump mongo-c-driver submodule from 2.2.3 to 2.3.0 using the ClickHouse
fork branch ClickHouse/2.3.0, which carries the strerror_l fix for
musl/FreeBSD builds and the mlib_have_posix_clocks detection fix.

Picks up the CDRIVER-6083 series, which refactors the `reply` ownership
contract in the cluster opmsg path and addresses a memory leak observed
in CI as a Direct leak of 128 bytes from `bson_copy_to` in
`_mongoc_cluster_run_opmsg_recv` (failing test:
test_dictionaries_all_layouts_separate_sources/test_mongo.py
::test_simple_ssl).

Update version constants in the c-driver cmake wrapper (2.2.2 -> 2.3.0).
No new template variables in the upstream config.h.in / mongoc-config.h.in,
and the wrapper uses file(GLOB_RECURSE), so the new sources
(mongoc-jitter-source, mongoc-retry-backoff-generator, mongoc-retryable-cmd)
are picked up automatically.

The mongo-cxx-driver wrapper does not need to change: cxx r4.1.4 declares
MONGOC_REQUIRED_VERSION 2.0.0, so it is compatible with c-driver 2.3.0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh Bot commented May 7, 2026

Workflow [PR], commit [58659cd]

Summary:


AI Review

Summary

This PR updates mongo-c-driver to 2.3.0 via submodule pointer bump and aligns contrib/mongo-c-driver-cmake/CMakeLists.txt version constants for libbson/libmongoc. I did not find correctness, safety, compatibility, or rollout issues in the submitted changes.

ClickHouse Rules
Item Status Notes
Deletion logging
Serialization versioning
Core-area scrutiny
No test removal
Experimental gate
No magic constants
Backward compatibility
SettingsChangesHistory.cpp
PR metadata quality
Safe rollout
Compilation time
No large/binary files
Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added pr-ci submodule changed At least one submodule changed in this PR. labels May 7, 2026
@evillique evillique self-assigned this May 7, 2026
@Algunenano Algunenano added this pull request to the merge queue May 7, 2026
Merged via the queue into master with commit 7b897be May 7, 2026
165 checks passed
@Algunenano Algunenano deleted the bump-mongo-c-driver-2.3.0 branch May 7, 2026 17:45
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-synced-to-cloud The PR is synced to the cloud repo label May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci pr-synced-to-cloud The PR is synced to the cloud repo submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants