Merge pull request #20129 from overleaf/jpa-handle-partial-deletion
[misc] improve handling of document deletion GitOrigin-RevId: bd6b225b91ab38365e9ff272c50ece995e767bf2
This commit is contained in:
@@ -774,6 +774,10 @@ const deleteEntity = wrapWithLock(
|
||||
throw new Error('No entityType set')
|
||||
}
|
||||
entityType = entityType.toLowerCase()
|
||||
|
||||
// Flush the entire project to avoid leaving partially deleted docs in redis.
|
||||
await DocumentUpdaterHandler.promises.flushProjectToMongo(projectId)
|
||||
|
||||
const { entity, path, projectBeforeDeletion, newProject } =
|
||||
await ProjectEntityMongoUpdateHandler.promises.deleteEntity(
|
||||
projectId,
|
||||
|
||||
Reference in New Issue
Block a user