Add 2-phase commit logic for 1 replica