Complex transactions often consist of one or more individual operations which, for example, update and query a number of distributed databases. It is important either that all these operations succeed or, if there is a problem with one or more of them, that they all fail and do not leave the distributed system in an incorrect state. An atomic commit protocol ensures that this happens.