Recovery of distributed transactions