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

prevent data loss while promoting from second replica to owner.