on verifying causal consistency
play

On Verifying Causal Consistency Ahmed Bouajjani, Constantin Enea, - PowerPoint PPT Presentation

On Verifying Causal Consistency Ahmed Bouajjani, Constantin Enea, Rachid Guerraoui, Jad Hamza IRIF, Universit e Paris Diderot May 2017 Geo-Replicated Data Structures Strong (sequential) consistency 1 S. Gilbert and N. A. Lynch. Brewers


  1. On Verifying Causal Consistency Ahmed Bouajjani, Constantin Enea, Rachid Guerraoui, Jad Hamza IRIF, Universit´ e Paris Diderot May 2017

  2. Geo-Replicated Data Structures Strong (sequential) consistency 1 S. Gilbert and N. A. Lynch. Brewer’s conjecture and the feasibility of consistent, available, partition-tolerant web services. 1 / 28

  3. Geo-Replicated Data Structures Strong (sequential) consistency write ( x , 2) write ( x , 1) 1 S. Gilbert and N. A. Lynch. Brewer’s conjecture and the feasibility of consistent, available, partition-tolerant web services. 1 / 28

  4. Geo-Replicated Data Structures Strong (sequential) consistency read ( x ) ◮ 1 read ( x ) ◮ 2 read ( x ) ◮ 1 read ( x ) ◮ 2 write ( x , 2) write ( x , 1) 1 S. Gilbert and N. A. Lynch. Brewer’s conjecture and the feasibility of consistent, available, partition-tolerant web services. 1 / 28

  5. Geo-Replicated Data Structures Strong (sequential) consistency is impossible while being available and tolerating network partitions : the CAP theorem 1 read ( x ) ◮ 1 read ( x ) ◮ 2 read ( x ) ◮ 1 read ( x ) ◮ 2 write ( x , 2) write ( x , 1) 1 S. Gilbert and N. A. Lynch. Brewer’s conjecture and the feasibility of consistent, available, partition-tolerant web services. 1 / 28

  6. Geo-Replicated Data Structures Tolerating faults while preserving availability leads to anomalies w.r.t. strong (sequential) consistency 2 / 28

  7. Geo-Replicated Data Structures Tolerating faults while preserving availability leads to anomalies w.r.t. strong (sequential) consistency write ( x , 2) write ( x , 1) 2 / 28

  8. Geo-Replicated Data Structures Tolerating faults while preserving availability leads to anomalies w.r.t. strong (sequential) consistency read ( x ) ◮ 1 read ( x ) ◮ 2 read ( x ) ◮ 2 read ( x ) ◮ 1 write ( x , 2) write ( x , 1) Updates are seen in different orders 2 / 28

  9. Goal: Verifying Causal Consistency The set of allowed anomalies are defined by weak consistency criteria, e.g., eventual consistency, causal consistency. Algorithmic methods for checking causal consistency . Single-Trace Verification : Check if one trace is causally consistent Application to testing, monitoring (by enumerating traces) All-Traces Verification : Check if all traces are causally consistent Static verification 3 / 28

  10. Comparison with other Consistency Criteria Single-Trace Verification: NP -complete for most consistency criteria 2 3 Memory Model-aware Testing. Furbach et al. 2014. 4 Model-Checking of Correctness Conditions. Alur et al. 1996. 5 On the complexity of linearizability. H. 2015. 6 Verifying Eventual Consistency of ORS. Bouajjani et al. 2014. 4 / 28

  11. Comparison with other Consistency Criteria Single-Trace Verification: NP -complete for most consistency criteria 2 NP -complete for causal consistency as well 3 Memory Model-aware Testing. Furbach et al. 2014. 4 Model-Checking of Correctness Conditions. Alur et al. 1996. 5 On the complexity of linearizability. H. 2015. 6 Verifying Eventual Consistency of ORS. Bouajjani et al. 2014. 4 / 28

  12. Comparison with other Consistency Criteria Single-Trace Verification: NP -complete for most consistency criteria 2 NP -complete for causal consistency as well Linearizability. EXPSPACE-complete. 3 , 4 All-Traces Verification: EXPSPACE -complete for linearizability 3 , 4 Causal consistency. ?? 3 Memory Model-aware Testing. Furbach et al. 2014. 4 Model-Checking of Correctness Conditions. Alur et al. 1996. 5 On the complexity of linearizability. H. 2015. 6 Verifying Eventual Consistency of ORS. Bouajjani et al. 2014. 4 / 28

  13. Comparison with other Consistency Criteria Single-Trace Verification: NP -complete for most consistency criteria 2 NP -complete for causal consistency as well Linearizability. EXPSPACE-complete. 3 , 4 All-Traces Verification: EXPSPACE -complete for linearizability 3 , 4 Sequential consistency. Undecidable. 1 Undecidable for sequential consistency 5 , 6 Causal consistency. ?? 3 Memory Model-aware Testing. Furbach et al. 2014. 4 Model-Checking of Correctness Conditions. Alur et al. 1996. 5 On the complexity of linearizability. H. 2015. 6 Verifying Eventual Consistency of ORS. Bouajjani et al. 2014. 4 / 28

  14. Comparison with other Consistency Criteria Single-Trace Verification: NP -complete for most consistency criteria 2 NP -complete for causal consistency as well Linearizability. EXPSPACE-complete. 3 , 4 All-Traces Verification: EXPSPACE -complete for linearizability 3 , 4 Sequential consistency. Undecidable. 1 Undecidable for sequential consistency 5 , 6 Decidable for eventual consistency 7 Causal consistency. ?? Eventual consistency. Decidable. 5 3 Memory Model-aware Testing. Furbach et al. 2014. 4 Model-Checking of Correctness Conditions. Alur et al. 1996. 5 On the complexity of linearizability. H. 2015. 6 Verifying Eventual Consistency of ORS. Bouajjani et al. 2014. 4 / 28

  15. Comparison with other Consistency Criteria Single-Trace Verification: NP -complete for most consistency criteria 2 NP -complete for causal consistency as well Linearizability. EXPSPACE-complete. 3 , 4 All-Traces Verification: EXPSPACE -complete for linearizability 3 , 4 Sequential consistency. Undecidable. 1 Undecidable for sequential consistency 5 , 6 Decidable for eventual consistency 7 Causal consistency. Undecidable. Undecidable for causal consistency Eventual consistency. Decidable. 5 3 Memory Model-aware Testing. Furbach et al. 2014. 4 Model-Checking of Correctness Conditions. Alur et al. 1996. 5 On the complexity of linearizability. H. 2015. 6 Verifying Eventual Consistency of ORS. Bouajjani et al. 2014. 4 / 28

  16. What About Usual Data Structures? Key-value store (read/write operations): one of the simplest and most widely used data structures. 5 / 28

  17. What About Usual Data Structures? Key-value store (read/write operations): one of the simplest and most widely used data structures. Theorem (All-Traces Verification) Checking if all traces of an implementation are causally consistent is undecidable . 5 / 28

  18. What About Usual Data Structures? Key-value store (read/write operations): one of the simplest and most widely used data structures. Theorem (All-Traces Verification) Checking if all traces of an implementation are causally consistent is undecidable . Even with the following restrictions: For key-value stores For a bounded number of sites For finite-state implementations For a bounded number of variables For a bounded variables’ domain 5 / 28

  19. What About Usual Data Structures? Key-value store (read/write operations): one of the simplest and most widely used data structures. Theorem (All-Traces Verification) Checking if all traces of an implementation are causally consistent is undecidable . Even with the following restrictions: For key-value stores For a bounded number of sites For finite-state implementations For a bounded number of variables For a bounded variables’ domain (Input: finite-state automaton representing all traces) 5 / 28

  20. Key Observation: Implementations Are Data Independent Key-value store implementations are data independent The behaviors do not depend on the particular values stored in the KVS. 6 / 28

  21. Key Observation: Implementations Are Data Independent Key-value store implementations are data independent The behaviors do not depend on the particular values stored in the KVS. ⇒ Writes can be assumed to be unique 6 / 28

  22. Results: Causal Consistency Violations Using Bad Patterns Bad Pattern : A set of operations related in a particular way 7 / 28

  23. Results: Causal Consistency Violations Using Bad Patterns Bad Pattern : A set of operations related in a particular way Identify a set of bad patterns X such that: Theorem (Bad Patterns) A trace is not causally consistent iff it contains some bad pattern from X 7 / 28

  24. Results: Causal Consistency Violations Using Bad Patterns Bad Pattern : A set of operations related in a particular way Identify a set of bad patterns X such that: Theorem (Bad Patterns) A trace is not causally consistent iff it contains some bad pattern from X X contains 4-6 bad patterns 7 / 28

  25. Results: Complexity/Decidability and Reduction to Reachability Bad patterns implications for data-independent implementations: Theorem (Single-Trace Verification) Singe-Trace Verification of causal consistency is polynomial when writes are unique . 8 / 28

  26. Results: Complexity/Decidability and Reduction to Reachability Bad patterns implications for data-independent implementations: Theorem (Single-Trace Verification) Singe-Trace Verification of causal consistency is polynomial when writes are unique . Theorem (Reduction to Reachability) All-Traces Verification can be reduced to reachability or invariant checking . (by building a monitor (state machine) M that tracks bad patterns) 8 / 28

  27. Results: Complexity/Decidability and Reduction to Reachability Bad patterns implications for data-independent implementations: Theorem (Single-Trace Verification) Singe-Trace Verification of causal consistency is polynomial when writes are unique . Theorem (Reduction to Reachability) All-Traces Verification can be reduced to reachability or invariant checking . (by building a monitor (state machine) M that tracks bad patterns) Theorem (All-Traces Verification) Checking whether all traces of a data-independent finite-state implementation are causally consistent is decidable . 8 / 28

  28. Outline Definition(s) of causal consistency 9 / 28

  29. Outline Definition(s) of causal consistency Characterize all causal consistency violations using bad patterns 9 / 28

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