[JENKINS-24763] Prevent thread starvation in OldDataMonitor by reducing scope of synchronization