Merge pull request #14294 from overleaf/tw-docupdater-flush

add metric to confirm what fraction of flush operations are unnecessary

GitOrigin-RevId: 29cff245de56da2cf6c10603570378ee97f00eb7
This commit is contained in:
Tyna William
2023-08-16 07:45:12 -04:00
committed by Copybot
parent 1f7079d54d
commit 2c4a5dd87b
@@ -296,6 +296,9 @@ module.exports = DocumentManager = {
callback(null)
} else {
logger.debug({ projectId, docId, version }, 'flushing doc')
Metrics.inc('flush-doc-if-loaded', {
status: unflushedTime != null ? 'modified' : 'unmodified',
})
PersistenceManager.setDoc(
projectId,
docId,