跳转到主要内容
dropboxEntities 为 Dropbox 同步在项目与某个用户的 Dropbox 之间复制过的每个文件保存一个文档,另外还有短期存在的 tombstone。该集合属于 Dropbox 同步:third-party-datastore(services/third-party-datastore/app/js/StateManager.mjs)写入并读取它,dropbox web 模块(services/web/modules/dropbox/app/src/DropboxHandler.mjs)清除它。没有 Mongoose schema。

字段

tombstone 只有 overleaf.userId、dropbox.pathLower、tombstone 和 createdAt(StateManager.mjs:96-103)。

谁写入

谁读取

索引

20220811111800_create_dropboxEntities_index.mjs 和 20220825160708_recreate_dropboxEntities.mjs 只带有 saas 标签,因此 CE 既没有它们在 (overleaf.userId, dropbox.id) 和 (overleaf.userId, overleaf.id) 上的唯一索引,也没有它们在 dropbox.pathLower 上的哈希索引。

说明

  • 唯一性仅来自 recordEntity 中每次插入前的删除(StateManager.mjs:38-45)。StateManager.mjs:3-11 的注释提到了唯一索引;CE 没有这些索引。
  • 按用户和路径的查询(findEntityByPath、findTombstone、removeEntities)只对 overleaf.userId 使用索引。
最后修改于 2026年11月20日