Reliability and Partition Types of Failures 1.Node failure 2.Communication line of failure 3.Loss of a message (or transaction) 4.Network partition 5.Any.

Slides:



Advertisements
Similar presentations
Topic 6.3: Transactions and Concurrency Control Hari Uday.
Advertisements

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
Replication and Consistency (2). Reference r Replication in the Harp File System, Barbara Liskov, Sanjay Ghemawat, Robert Gruber, Paul Johnson, Liuba.
1 CSIS 7102 Spring 2004 Lecture 8: Recovery (overview) Dr. King-Ip Lin.
Chapter 19 Database Recovery Techniques
Transaction.
Database Systems, 8 th Edition Concurrency Control with Time Stamping Methods Assigns global unique time stamp to each transaction Produces explicit.
CIS 720 Concurrency Control. Timestamp-based concurrency control Assign a timestamp ts(T) to each transaction T. Each data item x has two timestamps:
Chapter 13 (Web): Distributed Databases
ICS 421 Spring 2010 Distributed Transactions Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 3/16/20101Lipyeow.
CS 582 / CMPE 481 Distributed Systems
ICS (072)Database Recovery1 Database Recovery Concepts and Techniques Dr. Muhammad Shafique.
1 Minggu 8, Pertemuan 16 Transaction Management (cont.) Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
Synchronization. Physical Clocks Solar Physical Clocks Cesium Clocks International Atomic Time Universal Coordinate Time (UTC) Clock Synchronization Algorithms.
CS-550 (M.Soneru): Recovery [SaS] 1 Recovery. CS-550 (M.Soneru): Recovery [SaS] 2 Recovery Computer system recovery: –Restore the system to a normal operational.
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
©Silberschatz, Korth and Sudarshan19.1Database System Concepts Distributed Transactions Transaction may access data at several sites. Each site has a local.
Optimistic Concurrency Control Merger of Semi-Committed Transactions From Several Partitions Combine DCG, DCG 2, --- DCG N (minimize rollback if cycle.
CMPT Dr. Alexandra Fedorova Lecture XI: Distributed Transactions.
CMPT Dr. Alexandra Fedorova Lecture XI: Distributed Transactions.
Distributed Databases
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
Commit Protocols. CS5204 – Operating Systems2 Fault Tolerance Causes of failure: process failure machine failure network failure Goals : transparent:
Distributed Deadlocks and Transaction Recovery.
Distributed Transactions March 15, Transactions What is a Distributed Transaction?  A transaction that involves more than one server  Network.
Chapter 19 Recovery and Fault Tolerance Copyright © 2008.
Transaction Communications Yi Sun. Outline Transaction ACID Property Distributed transaction Two phase commit protocol Nested transaction.
Reliability and Security in Database Servers By Samuel Njoroge.
Chapterb19 Transaction Management Transaction: An action, or series of actions, carried out by a single user or application program, which reads or updates.
Databases Illuminated
HANDLING FAILURES. Warning This is a first draft I welcome your corrections.
Lecture 12 Recoverability and failure. 2 Optimistic Techniques Based on assumption that conflict is rare and more efficient to let transactions proceed.
PMIT-6102 Advanced Database Systems By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
Session - 17 RECOVERY CONTROL - 2 Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
Databases Illuminated
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
Commit Algorithms Hamid Al-Hamadi CS 5204 November 17, 2009.
Transaction Management Transparencies. ©Pearson Education 2009 Chapter 14 - Objectives Function and importance of transactions. Properties of transactions.
Introduction to Distributed Databases Yiwei Wu. Introduction A distributed database is a database in which portions of the database are stored on multiple.
Recovery technique. Recovery concept Recovery from transactions failure mean data restored to the most recent consistent state just before the time of.
Antidio Viguria Ann Krueger A Nonblocking Quorum Consensus Protocol for Replicated Data Divyakant Agrawal and Arthur J. Bernstein Paper Presentation: Dependable.
Topics in Distributed Databases Database System Implementation CSE 507 Some slides adapted from Navathe et. Al and Silberchatz et. Al.
Distributed Databases – Advanced Concepts Chapter 25 in Textbook.

Database recovery techniques
Database Recovery Techniques
Recovery in Distributed Systems:
Outline Introduction Background Distributed DBMS Architecture
File Processing : Recovery
Database System Implementation CSE 507
Operating System Reliability
Operating System Reliability
Commit Protocols CS60002: Distributed Systems
Outline Announcements Fault Tolerance.
Operating System Reliability
Operating System Reliability
Chapter 10 Transaction Management and Concurrency Control
Distributed Databases
Outline Introduction Background Distributed DBMS Architecture
Introduction of Week 13 Return assignment 11-1 and 3-1-5
Operating System Reliability
Database Recovery 1 Purpose of Database Recovery
Exercises for Chapter 14: Distributed Transactions
Distributed Databases Recovery
Transactions in Distributed Systems
CIS 720 Concurrency Control.
Operating System Reliability
Transaction Communication
Operating System Reliability
Presentation transcript:

Reliability and Partition Types of Failures 1.Node failure 2.Communication line of failure 3.Loss of a message (or transaction) 4.Network partition 5.Any combination of above Reliability In case of a crash, recover to a consistent (or correct state) and continue processing.

Reliability and Partition Approaches to Reliability 1.Audit trails (or logs) 2.Two phase commit protocol 3.Retry based on timing mechanism 4.Reconfigure 5.Allow enough concurrency which permits definite recovery (avoid certain types of conflicting parallelism) 6.Crash resistance design

Reliability and Partition Recovery Controller Types of failures: * transaction failure * site failure (local or remote) * communication system failure Transaction failure UNDO/REDO Logs(Gray) transparent transaction (effects of execution in private workspace)  Failure does not affect the rest of the system Site failure volatile storage lost stable storage lost processing capability lost (no new transactions accepted)

Reliability and Partition System Restart Types of transactions: 1. In commitment phase 2. Committed actions reflected in real/stable 3. Have not yet begun 4. In prelude (have done only undoable actions) We need: stable undo log; stable redo log (at commit); perform redo log (after commit) Problem: entry into undo log; performing the action Solution: undo actions  must be restartable (or idempotent) DO – UNDO  UNDO  DO – UNDO – UNDO – UNDO --- UNDO

Reliability and Partition Local site failure - Transaction committed  do nothing - Transaction semi-committed  abort - Transaction computing/validating  abort AVOIDS BLOCKING Remote site failure - Assume failed site will accept transaction - Send abort/commit messages to failed site via spoolers Initialization of failed site - Update for globally committed transaction before validating other transactions - If spooler crashed, request other sites to send list of committed transactions

Reliability and Partition Communication system failure - Network partition - Lost message - Message order messed up Network partition - Semi-commit in all partitions and commit on reconnection (updates available to user with warning) - Commit transactions if primary copy taken for all entities within the partition - Consider commutative actions - Compensating transactions

Reliability and Partition Compensating transactions -Commit transactions in all partitions -Break cycle by removing semi-committed transactions -Otherwise abort transactions that are invisible to the environment (no incident edges) -Pay the price of committing such transactions and issue compensating transactions Recomputing cost -Size of readset/writeset -Computation complexity

Reliability and Partition time site of origin site B site C (coordinator) UNKNOWN active UNKNOWN active UNKNOWN active initiate commit READY prepare READY prepare COMMITTING commit COMMITTING commitack UNKNOWN inactive UNKNOWN inactive ack UNKNOWN inactive Figure 5.3: Linear Commit Protocol

Reliability and Partition Local Site FailureSystem’s Decision at Local Site After Committing/Aborting a local transaction Do nothing (Assume: Message has been sent to remote sites) After Semi-Committing a local transaction Abort transaction when local site recovers Send abort messages to other sites During computing/validating a local transaction Abort transaction when local site recovers Send abort message to other sites TABLE 1: Local Site Failure

Reliability and Partition Ripple Edges: T i reads a value produced by T j in same partition Precedence Edges: T i reads a value but has now been changed by T j in same partition Interference Edges: T i reads a data-item in one partition and T j writes in another partition then T i → T j Finding minimal number of nodes to break all cycles in a precedence graph consisting of only two-cycle of ripple edges has a polynomial solver.

Reliability and Partition Communications –Design Sockets, ports, calls (sendto, recvfrom) Oracle Server cache Addressing in RAID LUDP –High level calls Setup RegisterSelf ServActive ServAddr SendPacket RecvMsg Software guide (where is the code and how is it compiled?) Testing RAID –RAID installation –RAIDTOol –Example test session Recommended reading How to incorporate a new server (RC) How to run an experiment (John-Comm)

Reliability and Partition Storage of backup copies of database –Reduce storage –Maintain number of versions –Access time Move servers at Kernel level –Buffer pool, scheduler, lightweight processes –Shared memory

Reliability and Partition New protocols and algorithms Replicated copy control –survivability –availability –reconfigurability –consistency and dependability –performance

Reliability and Partition Site is up All data items are available Site is down None of the data items are available Site is up (all fail locks for this site released) Continued recovery, copies on failed site marked and fail-locks are released Partial recovery, unmarked data-objects are available Control transaction 1 running Figure : States in site recovery and availability of data-items for transaction processing

Reliability and Partition ABCDEFGH ABCDE ABC DE GH F FGH ABCDE B A

Reliability and Partition Data Structures Connection vector at each site: Vector of boolean values Partition graph ABCDE ABC B DE C AC A ADE

Reliability and Partition Site name vector of file f (n is the number of copies) S = Linear order vector of file f L = Version number X of a copy of file f Number of times network partitioned while the copy is in majority

Reliability and Partition Version vector of a copy at site S i V = Marked vector of a copy of file f M = m i = T if marked = F if unmarked

Reliability and Partition ABCDE ABC B DE C AC A ADE

Reliability and Partition {1,2,3,4,5,6,7} undefined {1,2,5,6} undefined {1,2} undefined {1} {1,2,3,4,5,6,7} undefined {3,4,7}} undefined {3} Examples of Partition Trees P_tree S 1 : P_tree S 3 : Figure 9. Partition trees maintained at S 1 and S 3 before any merge of partition occurs (a) (b)

Reliability and Partition Partition Tree after Merge P_tree S 1, 3 : Figure 10. Partition tree maintained at S 1 and/or S 3 after S 3 merge {1,2,3,4,5,6,7} {1,2,5,6} undefined {1,2} undefined {1} {3,4,7} undefined {3}