fix mongo: avoid deprecated bson_append_array_begin#1283
Closed
crystarm wants to merge 1 commit into
Closed
Conversation
Contributor
Author
|
Testing was done with locally built Userver was configured with Ran tests: |
Member
|
LGTM |
|
Many thanks for the PR! @apolukhin is now importing your pull request into our internal upstream repository. |
|
✅ This pull request is being closed because it has been successfully merged into our internal monorepository. |
robot-piglet
pushed a commit
that referenced
this pull request
Jul 1, 2026
Fixes #1225 ## Summary Fixes usage of `bson_append_array_begin`, which is deprecated in libbson / mongo-c-driver `2.3.0`. For libbson `2.3.0+`, use `bson_append_array_unsafe_begin` instead. Older supported libbson versions keep using `bson_append_array_begin`, because `bson_append_array_unsafe_begin` is not available there. The replacement preserves the existing `bson_t*` subarray-building flow and remains compatible with the current manual array key generation via `ArrayIndexer`. --- Pull Request resolved: #1283 commit_hash:5886162296aa75b2ce13961d2f53df9d49b1cde6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #1225.
Summary
Fixes usage of
bson_append_array_begin, which is deprecated in libbson / mongo-c-driver2.3.0.For libbson
2.3.0+, usebson_append_array_unsafe_begininstead. Older supported libbson versions keep usingbson_append_array_begin, becausebson_append_array_unsafe_beginis not available there.The replacement preserves the existing
bson_t*subarray-building flow and remains compatible with the current manual array key generation viaArrayIndexer.