Two-phase commit protocol implementation