[DOCS-16027] [Server] Elaborate on $set tracking changed fields on update Created: 11/Apr/23  Updated: 22/Jan/24

Status: Backlog
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Minor - P4
Reporter: Ilan Cohen Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: backlog, proactive
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 43 weeks, 1 day ago

 Description   

I believe that our documentation on $set should include a section which explains how it doesn't change the fields that don't change in the update, so only ones that changed get written to the oplog. This is a major selling point for using $set and, in my point of view, not obvious that it works like that.

Advantages over full document replacement:

  • Computes the delta of the existing document and fields in $set
  • Only changes are written to the oplog
  • Smaller memory footprint

This saves a lot of work for the client intersecting documents to figure out which fields have been changed before sending an update.


Generated at Thu Feb 08 08:14:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.