[CDRIVER-4019] Remove redundant empty payload checks in legacy delete and insert functions Created: 08/Jun/21 Updated: 15/Apr/22 |
|
| Status: | Backlog |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Jeremy Mikola | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | CDRIVER-4107 |
| 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). |