docSnapshots holds copies of a doc that document-updater takes just before an edit that collapses comments or tracked changes. Only document-updater writes it, in services/document-updater/app/js/SnapshotManager.js. Web has a Mongoose model in services/web/app/src/models/DocSnapshot.mjs, but no code uses it.
Fields
Who Writes It
Who Reads It
No code reads it. The web model is defined but not used anywhere.Indexes
The
project_id_1 index of 20190912145007_create_docSnapshots_indexes.mjs was dropped by 20231101191643_drop_unused_indexes.mjs.
Notes
- Only edits that go through
UpdateManager.applyUpdatetake snapshots. Edits handled byHistoryOTUpdateManagerdo not (UpdateManager.js:74-77). - There is no index on
doc_id. Find the snapshots of a doc byproject_idandts, then filter ondoc_id.

