On Thu, Jun 16, 2022 at 08:11:20PM +0000, Hamid Maadani wrote:

> Please let me know if any other adjustments are necessary.

You need to read the mongodb documentation with care and make sure
that you honour their API contract.  For example:

    mongoc_init():
        Initialize the MongoDB C Driver by calling mongoc_init() exactly
        once at the beginning of your program. It is responsible for
        initializing global state such as process counters, SSL, and
        threading primitives.

And yet you call this function once per table in the "open" routine.
This may make the code unsafe for opening multiple tables.

Please review the correctness/safety of all the touch points between
MongoDB and the table driver.  Does anything special need to be done to
avoid issues with non-utf8 binary inputs?  Perhaps all query keys that
are not valid UTF8 should short-circuit to "not found"?

-- 
    Viktor.

Reply via email to