Skip to content

CDRIVER-5780 Support QE with Client.bulkWrite #2043

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

mdb-ad
Copy link
Contributor

@mdb-ad mdb-ad commented Jun 18, 2025

@mdb-ad mdb-ad requested a review from a team as a code owner June 18, 2025 00:24
@mdb-ad mdb-ad requested review from eramongodb and kevinAlbs and removed request for eramongodb June 18, 2025 00:24
@mdb-ad mdb-ad requested review from kevinAlbs and eramongodb July 17, 2025 06:05
Copy link
Contributor

@eramongodb eramongodb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestion; otherwise, LGTM.

static bool
_state_need_mongo_collinfo (_state_machine_t *state_machine, bson_error_t *error)
_state_need_mongo_collinfo (_state_machine_t *state_machine, bool with_db, bson_error_t *error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this bool with_db parameter be made char const* db_name instead?

static bool
_state_need_mongo_collinfo (_state_machine_t *state_machine, char const* db_name, bson_error_t *error)
{
   ...
   db = mongoc_client_get_database (state_machine->collinfo_client, db_name);
   ...
      case MONGOCRYPT_CTX_NEED_MONGO_COLLINFO:
         if (!_state_need_mongo_collinfo (state_machine, state_machine->db_name, error)) {
            goto fail;
         }
         break;
      case MONGOCRYPT_CTX_NEED_MONGO_COLLINFO_WITH_DB: {
         char const *const db_name = mongocrypt_ctx_mongo_db (state_machine->ctx);
         if (!db_name) {
            _ctx_check_error (state_machine->ctx, error, true);
            goto fail;
         }
         if (!_state_need_mongo_collinfo (state_machine, db_name, error)) {
            goto fail;
         }
         break;
      }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants