That means we depend on the coordinator and if it

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: y control, its automatic – we simply don’t care: we abort any transaction that can’t commit because it is using stale or invalid data. - - Distributed transactions and two phase commit So far, we’ve been updating state at a server. We use caches and cache coherence to be able to do operations more quickly, and transactions to ensure that the persistent state is updated at the server in a consistent way, despite client failures. But what if we need to update state at two servers? An example: data is stored in shards across a number of servers, but we still want serializability across the entire system. We want the state to be updated consistently, despite client and server failures. Now recall the first class: we showed that you can’t coordinate simultaneous action on two nodes, in the presence of unreliable messages, even if no messages get lost. So how are we to update state in two places in a consistent way? If we can’t coordinate simultaneous action, what can we have? Eventual agreement, provided nodes eventually recover. We could just have one side dictate the result – but then, if the other side can’t complete the transaction (e.g., it runs into a deadlock), problem! Hence, two phase commit – first, check that transaction can...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online