Principles Of Distributed Database Systems Exercise Solutions Site

p1 : Dept = ‘Sales’ p2 : Dept = ‘Eng’

One lock coordinator. T1 requests lock on A: OK. T2 requests lock on B: OK. T1 requests lock on B: wait. T2 requests lock on A: deadlock detected immediately by centralized manager. Resolution: abort T2. Pro: Simple deadlock detection. Con: Single point of failure, bottleneck. p1 : Dept = ‘Sales’ p2 : Dept

We can then replicate each fragment on multiple nodes in the system, for example: they know everyone voted YES

If the coordinator crashes now, the surviving participants can communicate. If any participant has received "Pre-Commit", they know everyone voted YES, so they can safely elect a new coordinator and proceed to Commit. If no one received "Pre-Commit", they know it is safe to Abort. p1 : Dept = ‘Sales’ p2 : Dept