prevent data loss while promoting from second replica to owner.
Merge pull request #2975 from eminn/fix/data-loss-while-promoting-from-backup-maintenance

[backport] prevent data loss while promoting from second replica to owner.