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 6db48cdaa3
commit 277fe530ad

View file

@ -296,6 +296,9 @@ module.exports = DocumentManager = {
callback(null) callback(null)
} else { } else {
logger.debug({ projectId, docId, version }, 'flushing doc') logger.debug({ projectId, docId, version }, 'flushing doc')
Metrics.inc('flush-doc-if-loaded', {
status: unflushedTime != null ? 'modified' : 'unmodified',
})
PersistenceManager.setDoc( PersistenceManager.setDoc(
projectId, projectId,
docId, docId,