robustness against parallel snapshot isolation
play

Robustness against Parallel Snapshot Isolation Giovanni Bernardi - PowerPoint PPT Presentation

Robustness against Parallel Snapshot Isolation Giovanni Bernardi jointly with Andrea Cerone Alexey Gotsman 1 / 22 strong consistency weak consistency Eventual Consistency, Sequential DB Causal Consistency, Parallel Snapshot Isolation


  1. Robustness against Parallel Snapshot Isolation Giovanni Bernardi jointly with Andrea Cerone Alexey Gotsman 1 / 22

  2. strong consistency weak consistency Eventual Consistency, Sequential DB Causal Consistency, Parallel Snapshot Isolation High Latency Low Latency 2 / 22

  3. P = wr ( y , 1) txn { rd ( x ); rd ( y ) } wr ( x , 1) �≈ Sequential DB 3 / 22

  4. P = wr ( y , 1) txn { rd ( x ); rd ( y ) } wr ( x , 1) wr x 1 wr y 1 �≈ Sequential DB 4 / 22

  5. P = wr ( y , 1) txn { rd ( x ); rd ( y ) } wr ( x , 1) wr x 1 wr y 1 �≈ Sequential DB 5 / 22

  6. P = wr ( y , 1) txn { rd ( x ); rd ( y ) } wr ( x , 1) wr x 1 rd x 0; rd y 1 rd x 1; rd y 0 wr y 1 �≈ Sequential DB 6 / 22

  7. Robustness against psi behaviours of P behaviours of P ? = psi sc 7 / 22

  8. Definition psi : TransHB + Ext + NoConflict T wr ( m , z ) T rd ( n , y ) Transactions: R , S , T , . . . H = { T 1 , T 2 , T 3 , T 4 } , finite Histories: H , H ′ , . . . ( H , hb) 8 / 22

  9. Definition psi : TransHB + Ext + NoConflict T wr ( m , z ) T rd ( n , y ) Transactions: R , S , T , . . . H = { T 1 , T 2 , T 3 , T 4 } , finite Histories: H , H ′ , . . . ( H , hb) ∀ R , S , T ∈ H . R hb S and S hb T ⇒ R hb T hb rd y 1; wr x 1 hb wr y 1 rd x 1; rd y 1 hb causal message delivery 9 / 22

  10. Definition psi : TransHB + Ext + NoConflict T wr ( m , z ) T rd ( n , y ) Transactions: R , S , T , . . . H = { T 1 , T 2 , T 3 , T 4 } , finite Histories: H , H ′ , . . . ( H , hb) ∀ T ∈ H . T rd ( x , n ) ⇒ lastwrite ( x , T , hb) wr ( x , n ) . . . hb rd y 1 ; wr x 1 hb wr y 1 rd x 1 ; rd y 1 hb reads return value written last according to hb or default initial 10 / 22

  11. Definition psi : TransHB + Ext + NoConflict T wr ( m , z ) T rd ( n , y ) Transactions: R , S , T , . . . H = { T 1 , T 2 , T 3 , T 4 } , finite Histories: H , H ′ , . . . ( H , hb) ∀ S , T ∈ H . T , S wr ( x , ) = ⇒ S = T or S hb T or T hb S wr x 3 hb wr x 5 write-write conflict detection 11 / 22

  12. Definition sc : TransHB + Ext + TotalHB T wr ( m , z ) T rd ( n , y ) Transactions: R , S , T , . . . H = { T 1 , T 2 , T 3 , T 4 } , finite Histories: H , H ′ , . . . ( H , hb) S = T or S hb T or T hb S ∀ S , T ∈ H . hb rd z 0 hb wr y 5 hb rd y 5; wr z 7 hb hb hb wr x 3 serial execution 12 / 22

  13. Robustness against psi behaviours of P behaviours of P ? = psi sc Idea: define φ s.t. ∀ ( H , hb) ∈ psi . φ ( H , hb) implies ∃ hb ′ . ( H , hb ′ ) ∈ sc show a total hb ′ over H s.t. easy reads return values written last according to hb ′ hard 13 / 22

  14. Dynamic dependency graph function λ DDG ( H , hb) = ( H , − → ) ◮ T overwrites value written by S on x S hb T ww , x S T ◮ T reads the value written by S on x S hb T wr , x S T ◮ S overwrites a value read by T ww , x wr x , 1 S rd x , 0 R T rw , x rw , x wr , x 14 / 22

  15. Dynamic dependency graph function λ DDG ( H , hb) = ( H , − → ) wr x 1 ◮ T overwrites value written by S on x hb rd x 0; rd y 1 ww , x rd x 1; rd y 0 S T hb ◮ T reads the value written by S on x wr y 1 wr , x S T rw edges ⇒ DDG ( H , hb) may contain cycles ◮ S overwrites a value read by T ww , x wr x , 1 S rd x , 0 R T rw , x rw , x wr , x 15 / 22

  16. Dynamic dependency graph function λ DDG ( H , hb) = ( H , − → ) wr x 1 ◮ T overwrites value written by S on x wr , x rw , y rd x 0; rd y 1 ww , x rd x 1; rd y 0 S T rw , x wr , y ◮ T reads the value written by S on x wr y 1 wr , x S T rw edges ⇒ DDG ( H , hb) may contain cycles ◮ S overwrites a value read by T ww , x wr x , 1 S rd x , 0 R T rw , x rw , x wr , x 16 / 22

  17. Robustness against psi behaviours of P behaviours of P ? = psi sc ∀ ( H , hb) ∈ psi . 1. if acyclic ( DDG ( H , hb)) then ∃ hb ′ . ( H , hb ′ ) ∈ sc 2. if ∃ total po hb ′ . hb ′ contains edges DDG ( H , hb) then reads return values written last according to hb ′ or default initial 17 / 22

  18. Robustness against psi behaviours of P behaviours of P ? = psi sc ∀ ( H , hb) ∈ psi . 1. if acyclic ( DDG ( H , hb)) then ∃ hb ′ . ( H , hb ′ ) ∈ sc 2. if ∃ total po hb ′ . hb ′ contains edges DDG ( H , hb) then reads return values written last according to hb ′ or default initial As it is, useless for static analysis! 18 / 22

  19. Robustness criterion Cycle π in DDG ( H , hb) PSI-critical if rw , x rw , y S ′ → T ′ ◮ π contains S − − − → T , − − − ◮ x � = y for all ( H , hb) ∈ psi no critical cycles in DDG ( H , hb) implies ∃ hb ′ . ( H , hb ′ ) ∈ sc 19 / 22

  20. wr x 1 wr , x rw , y rd x 0; rd y 1 rd x 1; rd y 0 rw , x wr , y wr y 1 20 / 22

  21. in this talk First robustness criterion for psi on going work Reasoning techniques for geo-replicated DBs ◮ Uniform axiomatisation weak consistency levels Paper to appear at CONCUR’15 ◮ Systematic investigation robustness/chopping First chopping criterion for si ask Andrea ◮ Checking robustness of applications against psi TPC-C, RUBiS, . . . 21 / 22

  22. That’s the story. Thank you :-) Questions? 22 / 22

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