Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-4019

Remove redundant empty payload checks in legacy delete and insert functions

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • libmongoc
    • None

    Description

      _mongoc_write_command_delete_legacy and _mongoc_write_command_insert_legacy both check if command->n_documents is zero. This notably does not happen for the update function.

      These checks appear to be redundant due to _empty_error in mongoc-write-command.c, which applies to all write command code paths (before the protocol is chosen).

      Attachments

        Activity

          People

            Unassigned Unassigned
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: