userver icon indicating copy to clipboard operation
userver copied to clipboard

libmongoc might use blocking usleep call on worker TaskProcessor

Open itrofimow opened this issue 1 year ago • 0 comments

Basically, title.

It happens somewhere in topology rescan routine, and internally we patch libmongoc to avoid that: https://github.com/userver-framework/userver/blob/3cdb435a57d91df88124cbfdddaac714ba07b1d6/mongo/src/storages/mongo/cdriver/wrappers.cpp#L42-L45

With recently landed https://github.com/mongodb/mongo-c-driver/pull/1442 there's now similar functionality (scoped to mongoc_client_t rather than global) in upstream libmongoc, and we should use that if available.

P.S. Consider this a tracking issue

itrofimow avatar Jan 15 '24 23:01 itrofimow