reliability
play

Reliability In case of a crash, recover to a consistent (or correct - PowerPoint PPT Presentation

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


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

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

  3. 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) Distributed DBMS Reliability and Partition. 3

  4. 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:  < T, A, E > undo actions must be restartable (or idempotent) DO – UNDO  UNDO  DO – UNDO – UNDO – UNDO --- UNDO Distributed DBMS Reliability and Partition. 4

  5. 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 Distributed DBMS Reliability and Partition. 5

  6. 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 Distributed DBMS Reliability and Partition. 6

  7. 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 - Distributed DBMS Reliability and Partition. 7

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

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

  10. Ripple Edges: T i reads a value produced by T j in same partition Precedence Edges: Ti reads a value but has now been changed by Tj 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. Distributed DBMS Reliability and Partition. 10

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

  12. 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 Distributed DBMS Reliability and Partition. 12

  13. New protocols and algorithms Replicated copy control • Survivability • Availability • Reconfigurability • Consistency and dependability • Performance Distributed DBMS Reliability and Partition. 13

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

  15. ABCDEFGH ABCDE FGH DE F GH ABC AB C D E B A Distributed DBMS Reliability and Partition. 15

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

  17. Site name vector of file f (n is the number of copies) S = < s 1 , s 2 ,…, s n > Linear order vector of file f L = < l 1 , l 2 ,…, l n > Version number X of a copy of file f Number of times network partitioned while the copy is in majority Distributed DBMS Reliability and Partition. 17

  18. Version vector of a copy at site S i V = < v 1 , v 2 ,…, v n > Marked vector of a copy of file f M = < M 1 , m 2 ,…, m n > m i = T if marked = F if unmarked Distributed DBMS Reliability and Partition. 18

  19. ABCDE ABC DE AC B A C ADE Distributed DBMS Reliability and Partition. 19

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

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

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend