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

Remove redundant empty payload checks in legacy delete and insert functions

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: libmongoc
    • None

      _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).

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

              Created:
              Updated: