dropboxEntities holds one document per file that Dropbox sync has copied between a project and one user’s Dropbox, plus short-lived tombstones. It belongs to Dropbox sync: third-party-datastore (services/third-party-datastore/app/js/StateManager.mjs) writes and reads it, and the dropbox web module (services/web/modules/dropbox/app/src/DropboxHandler.mjs) clears it. There is no Mongoose schema.
Fields
A tombstone has only
overleaf.userId, dropbox.pathLower, tombstone and createdAt (StateManager.mjs:96-103).
Who Writes It
Who Reads It
Indexes
20220811111800_create_dropboxEntities_index.mjs and 20220825160708_recreate_dropboxEntities.mjs are tagged saas only, so CE does not have their unique indexes on (overleaf.userId, dropbox.id) and (overleaf.userId, overleaf.id), or their hashed index on dropbox.pathLower.
Notes
- Uniqueness comes only from the delete before each insert in
recordEntity(StateManager.mjs:38-45). The comment atStateManager.mjs:3-11mentions unique indexes; CE does not have them. - Queries by user and path (
findEntityByPath,findTombstone,removeEntities) use the index only foroverleaf.userId.

