-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customizable libmongoc driver version #114
Comments
@baumgold thanks for reporting this! This is really bad, actually. As a workaround, you can add this to the
Can you give more detail on your error? (code example, mongodb server version, operating system, Julia version). |
Using Mongoc v0.9.0 and MongoC_jll v1.25.1+0: julia> versioninfo()
Julia Version 1.9.4
Commit 8e5136fa297 (2023-11-14 08:46 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 48 × Intel(R) Xeon(R) Gold 6136 CPU @ 3.00GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, skylake-avx512)
Threads: 4 on 48 virtual cores
Environment:
JULIA_NUM_THREADS = 4
julia> using Mongoc
julia> client = Mongoc.Client("mongo-hedge-solicitor-prod", 27017)
julia> Mongoc.find_one(client["hedge-solicitor"]["hedge-notifications"])
ERROR: BSONError: domain=3, code=15, message=Server at mongo-hedge-solicitor-prod:27017 reports wire version 4, but this version of libmongoc requires at least 6 (MongoDB 3.6)
Stacktrace:
[1] _iterate(cursor::Mongoc.Cursor{Mongoc.Collection}, state::Nothing)
@ Mongoc ~/.julia/packages/Mongoc/tJNDW/src/collection.jl:690
[2] _iterate
@ ~/.julia/packages/Mongoc/tJNDW/src/collection.jl:680 [inlined]
[3] #find_one#62
@ ~/.julia/packages/Mongoc/tJNDW/src/collection.jl:332 [inlined]
[4] find_one
@ ~/.julia/packages/Mongoc/tJNDW/src/collection.jl:327 [inlined]
[5] find_one(collection::Mongoc.Collection)
@ Mongoc ~/.julia/packages/Mongoc/tJNDW/src/collection.jl:327
[6] top-level scope
@ REPL[3]:1
julia> Mongoc.get_server_mongodb_version(client)
ERROR: BSONError: domain=3, code=15, message=Server at mongo-hedge-solicitor-prod:27017 reports wire version 4, but this version of libmongoc requires at least 6 (MongoDB 3.6)
Stacktrace:
[1] command_simple
@ ~/.julia/packages/Mongoc/tJNDW/src/database.jl:33 [inlined]
[2] get_server_mongodb_version(client::Mongoc.Client{Nothing})
@ Mongoc ~/.julia/packages/Mongoc/tJNDW/src/client.jl:79
[3] top-level scope
@ REPL[8]:1 After downgrading MongoC_jll to v1.19.1+0: julia> using Mongoc
julia> Mongoc.get_server_mongodb_version(Mongoc.Client("mongo-hedge-solicitor-prod", 27017))
v"3.2.22" |
@felipenoris - anything I can do to help here? Thanks. |
Upon the recent release of MongoC_jll.jl v1.25.1+1 (a major version bump) my client code that uses Mongoc.jl automatically picked up the new MongoC_jll.jl (as expected). However this caused my previously working code to break with the following error:
How can I explicitly specify the libmongoc driver version that I want to use in my client code? Suggestions appreciated.
The text was updated successfully, but these errors were encountered: