SlideShare a Scribd company logo
©2015 DataStax. Do not distribute without consent.
DataStax
Philip Thompson

Software Engineer
The Cassandra Validation Harness:
Achieving More Stable Releases
1
©2015 DataStax
Release Stability
• New Major Releases, X.Y.0
• Historically challenging
• Few functional bugs, many “at scale” bugs
• Problems with doing operator tasks while under load
• 6285 - HSHA corrupt data
• 10270 - C* stops compacting
• 9687 - Wrong partitioner after upgrade
• 9116 - Indexes lost on upgrade
2
©2015 DataStax
Tick Tock
• 3.1, 3.2, etc
• Reducing scope not enough to reduce defect rate
• Need to catch more bugs in testing
3
©2015 DataStax
Test Retrospective Process
• Analyzing every bug filed to the Apache C* Jira by
OSS users
• http://www.mail-archive.com/
dev@cassandra.apache.org/msg08106.html
4
©2015 DataStax
Jepsen
• Correctness testing
• Made famous by Aphyr’s Call Me Maybe series
• https://github.com/riptano/jepsen
5
©2015 DataStax
Cassandra Dtest
• Current non-unit test framework
• github.com/riptano/cassandra-dtest
• Python based tests, backed by CCM
6
©2015 DataStax
CCM
7
• CCM - Cassandra Cluster Manager
• https://github.com/pcmanus/ccm
• Simulates a C* cluster on localhost
• Starts multiple JVMs, separated with loopback
addresses
©2015 DataStax
Problems w/ existing tests
• Mostly short-lived, functional tests
• Difficult to coordinate testing features in parallel
8
©2015 DataStax
CVH
• Simulate a real production environment
• Multiple, concurrent administrative actions, while
cluster is under load
• Test the entire configuration space
9
©2015 DataStax
Architecture
• Harness
• Bridges
• Modules
10
©2015 DataStax
Bridges
• How do we test a real C* cluster?
• Entire lifecycle spin up/destroy
• Talk to nodes, why not use existing tools
• Inspiration from DataStax’s Java driver’s CCMBridge
11
©2015 DataStax
Modules
• Totally independent thread pools, that perform their
own operations and validation, communicate to the
harness
• Signal failures, request shutdown, etc
• Arbitrary modules can run in parallel, serial, or any
chain of ordering
12
©2015 DataStax
Module Validation
• Data Correctness
• OS and C* metrics
13
©2015 DataStax
Test writing process
• Simply write up a .yaml file that defines the modules
you need run, and the options to pass them.
• Code is called via reflection from yaml options
• If the modules you want exist, no need to write new
code.
14
©2015 DataStax
Sample Test
bridge: CCMBridge
nodeCount: 3

modules:

- [LargeStressWriteModule]

- [TableModule, ArbitraryStressOperationModule]

cassandrayaml: !!map

concurrent_reads: 1000

moduleArgs: !!map

ArbitraryStressOperationModule: !!map

stress_settings: write n=1M

ignoredErrors:

- "RejectedExecutionException"

requiredErrors:

- "Could not validate"
15
©2015 DataStax
Executor Services
• Nice way to do concurrent, async message passing
• Asynchronous execution of tasks in the background
• Accepts Runnables as tasks, returns Futures that
complete once the task is done
• The calling thread can continue with its own
execution, then block on the future to wait for the
executor
16
©2015 DataStax
Harness
• WrappedRunnables
• CompletableFuture
• Receives/Handles signals from Modules
• Passes messages between/to Modules
• JUnit’s Parameterized Runner
17
©2015 DataStax
Upcoming Improvements
• Bridge for manipulating arbitrary, physical hardware
• Attacking the test retrospective backlog
• “Permanent” cluster testing
• Dynamically created tests
• Performance testing
18
©2015 DataStax
CVH in action
• CASSANDRA-9913 - Select * Fails to return all data
• Not testable through unit tests
• Caught by the LargeStressWriteModule
19
©2015 DataStax
How to Contribute
• For now, work is being done a fork, in preparation for
merging into tree
• https://github.com/ptnapoleon/cassandra/tree/
validation-notest
• Eventually, will either be merged into C* trunk, or
turned into its own codebase
• Patches/PRs for code, tests, or documentation are
welcome and appreciated
20
©2015 DataStax
How to Contribute
• Suggestions/Ideas for new areas to test?
• We love those too
21
©2015 DataStax
Questions?
• Ask for ptnapoleon on freenode IRC #cassandra-dev
• @ptnapoleon
22
Thank you

More Related Content

PDF
Kafka Streams Windows: Behind the Curtain
PDF
GR8Conf 2011: Tuning Grails Applications by Peter Ledbrook
PPTX
OOW13 Exadata and ODI with Parallel
PDF
CDC patterns in Apache Kafka®
PPTX
Apache Apex connector with Kafka 0.9 consumer API
PDF
Performance tuning Grails applications
PPTX
Apache Apex Kafka Input Operator
PPTX
Stream data from Apache Kafka for processing with Apache Apex
Kafka Streams Windows: Behind the Curtain
GR8Conf 2011: Tuning Grails Applications by Peter Ledbrook
OOW13 Exadata and ODI with Parallel
CDC patterns in Apache Kafka®
Apache Apex connector with Kafka 0.9 consumer API
Performance tuning Grails applications
Apache Apex Kafka Input Operator
Stream data from Apache Kafka for processing with Apache Apex

What's hot (20)

PDF
Reactive Streams
PDF
Learnings from the Field. Lessons from Working with Dozens of Small & Large D...
PPTX
Scylla Cloud on Display: Functionality, Performance and Demos
PPTX
Comcast: Sprinting from Cassandra to Scylla
PPTX
The All-New Scylla Monitoring Stack
PDF
Kaseya Connect 2013: Optimizing Your K Server - Best Practices in Kaseya Infr...
PDF
Diving into the Deep End - Kafka Connect
PDF
Scylla Summit 2016: ScyllaDB, Present and Future
PDF
How Kafka and MemSQL Became the Dynamic Duo (Sarung Tripathi, MemSQL) Kafka S...
PPTX
The Problem is Data: Gwen Shapira, Confluent, Serverless NYC 2018
PPTX
High-Load Storage of Users’ Actions with ScyllaDB and HDDs
PPTX
Apache Apex Meetup at Cask
PDF
Zabbix 2014 Conference : Implementing Zabbix in large Banking Environment
PPTX
Developing Unit Testable Software with Hadoop at Expedia
PPTX
How Pixid dropped Oracle and went hybrid with MariaDB
PDF
Scylla Summit 2022: How ScyllaDB Powers This Next Tech Cycle
PPTX
Scylla Summit 2018: Scylla 3.0 and Beyond
PPTX
Site Performance Challenge: Magento with CloudMaestro
PPTX
Bi DevOps
PDF
Migrating Oracle database to PostgreSQL
Reactive Streams
Learnings from the Field. Lessons from Working with Dozens of Small & Large D...
Scylla Cloud on Display: Functionality, Performance and Demos
Comcast: Sprinting from Cassandra to Scylla
The All-New Scylla Monitoring Stack
Kaseya Connect 2013: Optimizing Your K Server - Best Practices in Kaseya Infr...
Diving into the Deep End - Kafka Connect
Scylla Summit 2016: ScyllaDB, Present and Future
How Kafka and MemSQL Became the Dynamic Duo (Sarung Tripathi, MemSQL) Kafka S...
The Problem is Data: Gwen Shapira, Confluent, Serverless NYC 2018
High-Load Storage of Users’ Actions with ScyllaDB and HDDs
Apache Apex Meetup at Cask
Zabbix 2014 Conference : Implementing Zabbix in large Banking Environment
Developing Unit Testable Software with Hadoop at Expedia
How Pixid dropped Oracle and went hybrid with MariaDB
Scylla Summit 2022: How ScyllaDB Powers This Next Tech Cycle
Scylla Summit 2018: Scylla 3.0 and Beyond
Site Performance Challenge: Magento with CloudMaestro
Bi DevOps
Migrating Oracle database to PostgreSQL
Ad

Viewers also liked (17)

PDF
Capital One: Using Cassandra In Building A Reporting Platform
PDF
AdStage: Monacella: An Relational Object Database using Cassandra as the Data...
PDF
DataStax: Testing Cassandra Guarantees Under Diverse Failure Modes With Jepsen
PDF
MyDrive Solutions: Case Study: Troubleshooting Production Issues as a Developer.
PDF
The Last Pickle: Repeatable, Scalable, Reliable, Observable: Cassandra
PDF
Silicon Valley Data Science: From Oracle to Cassandra with Spark
PDF
AddThis: Scaling Cassandra up and down into containers with ZFS
PDF
Stratio: Geospatial and bitemporal search in Cassandra with pluggable Lucene ...
PDF
DataStax: A deep look at the CQL WHERE clause
PDF
GumGum: Multi-Region Cassandra in AWS
PDF
SKB Kontur: Digging Cassandra cluster
PDF
codecentric AG: CQRS and Event Sourcing Applications with Cassandra
PDF
Cisco: Cassandra adoption on Cisco UCS & OpenStack
PPTX
Kafka for DBAs
PDF
PagerDuty: Span the WAN? Yes you can!
PDF
Tesora: Managing Cassandra Databases with OpenStack Trove
PDF
Restlet: Building a multi-tenant API PaaS with DataStax Enterprise Search
Capital One: Using Cassandra In Building A Reporting Platform
AdStage: Monacella: An Relational Object Database using Cassandra as the Data...
DataStax: Testing Cassandra Guarantees Under Diverse Failure Modes With Jepsen
MyDrive Solutions: Case Study: Troubleshooting Production Issues as a Developer.
The Last Pickle: Repeatable, Scalable, Reliable, Observable: Cassandra
Silicon Valley Data Science: From Oracle to Cassandra with Spark
AddThis: Scaling Cassandra up and down into containers with ZFS
Stratio: Geospatial and bitemporal search in Cassandra with pluggable Lucene ...
DataStax: A deep look at the CQL WHERE clause
GumGum: Multi-Region Cassandra in AWS
SKB Kontur: Digging Cassandra cluster
codecentric AG: CQRS and Event Sourcing Applications with Cassandra
Cisco: Cassandra adoption on Cisco UCS & OpenStack
Kafka for DBAs
PagerDuty: Span the WAN? Yes you can!
Tesora: Managing Cassandra Databases with OpenStack Trove
Restlet: Building a multi-tenant API PaaS with DataStax Enterprise Search
Ad

Similar to DataStax: The Cassandra Validation Harness: Achieving More Stable Releases (20)

PDF
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...
PPTX
Le novità di sql server 2019
PDF
Cassandra Day Chicago 2015: Building Java Applications with Apache Cassandra
PDF
DataStax Enterprise & Apache Cassandra – Essentials for Financial Services – ...
PPTX
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...
PPTX
Symantec SDN Deployment
PPTX
Webinar: Get On-Demand Education Anytime, Anywhere with Coursera and DataStax
PPTX
Devops kc
PPTX
Simplifying End-to-End Apache CloudStack Deployment with a Web-Based Automati...
PDF
Running PostgreSQL in a Kubernetes cluster: CloudNativePG
PDF
Francisco Javier Ramirez Urea - Hopla - OSL19
PPTX
Delivering SaaS Using IaaS - RightScale Compute 2013
PPTX
High Throughput Analytics with Cassandra & Azure
PDF
Observer, a "real life" time series application
PDF
Webinar: SQL for Machine Data?
PPTX
SAS Institute on Changing All Four Tires While Driving an AdTech Engine at Fu...
PDF
Instaclustr webinar 2017 feb 08 japan
PPTX
Apache cassandra v4.0
PPTX
SQL Server 2022 Programmability & Performance
PDF
Docker in Production: How RightScale Delivers Cloud Applications
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...
Le novità di sql server 2019
Cassandra Day Chicago 2015: Building Java Applications with Apache Cassandra
DataStax Enterprise & Apache Cassandra – Essentials for Financial Services – ...
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...
Symantec SDN Deployment
Webinar: Get On-Demand Education Anytime, Anywhere with Coursera and DataStax
Devops kc
Simplifying End-to-End Apache CloudStack Deployment with a Web-Based Automati...
Running PostgreSQL in a Kubernetes cluster: CloudNativePG
Francisco Javier Ramirez Urea - Hopla - OSL19
Delivering SaaS Using IaaS - RightScale Compute 2013
High Throughput Analytics with Cassandra & Azure
Observer, a "real life" time series application
Webinar: SQL for Machine Data?
SAS Institute on Changing All Four Tires While Driving an AdTech Engine at Fu...
Instaclustr webinar 2017 feb 08 japan
Apache cassandra v4.0
SQL Server 2022 Programmability & Performance
Docker in Production: How RightScale Delivers Cloud Applications

More from DataStax Academy (20)

PDF
Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
PPTX
Introduction to DataStax Enterprise Graph Database
PPTX
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
PPTX
Cassandra on Docker @ Walmart Labs
PDF
Cassandra 3.0 Data Modeling
PPTX
Cassandra Adoption on Cisco UCS & Open stack
PDF
Data Modeling for Apache Cassandra
PDF
Coursera Cassandra Driver
PDF
Production Ready Cassandra
PDF
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
PPTX
Cassandra @ Sony: The good, the bad, and the ugly part 1
PPTX
Cassandra @ Sony: The good, the bad, and the ugly part 2
PDF
Standing Up Your First Cluster
PDF
Real Time Analytics with Dse
PDF
Introduction to Data Modeling with Apache Cassandra
PDF
Cassandra Core Concepts
PPTX
Enabling Search in your Cassandra Application with DataStax Enterprise
PPTX
Bad Habits Die Hard
PDF
Advanced Data Modeling with Apache Cassandra
PDF
Advanced Cassandra
Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
Introduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
Cassandra on Docker @ Walmart Labs
Cassandra 3.0 Data Modeling
Cassandra Adoption on Cisco UCS & Open stack
Data Modeling for Apache Cassandra
Coursera Cassandra Driver
Production Ready Cassandra
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Sony: The good, the bad, and the ugly part 1
Cassandra @ Sony: The good, the bad, and the ugly part 2
Standing Up Your First Cluster
Real Time Analytics with Dse
Introduction to Data Modeling with Apache Cassandra
Cassandra Core Concepts
Enabling Search in your Cassandra Application with DataStax Enterprise
Bad Habits Die Hard
Advanced Data Modeling with Apache Cassandra
Advanced Cassandra

Recently uploaded (20)

PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Big Data Technologies - Introduction.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Machine Learning_overview_presentation.pptx
PPTX
Cloud computing and distributed systems.
PDF
Approach and Philosophy of On baking technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Programs and apps: productivity, graphics, security and other tools
MIND Revenue Release Quarter 2 2025 Press Release
Building Integrated photovoltaic BIPV_UPV.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Empathic Computing: Creating Shared Understanding
Big Data Technologies - Introduction.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Spectral efficient network and resource selection model in 5G networks
Machine Learning_overview_presentation.pptx
Cloud computing and distributed systems.
Approach and Philosophy of On baking technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Advanced methodologies resolving dimensionality complications for autism neur...
Digital-Transformation-Roadmap-for-Companies.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Mobile App Security Testing_ A Comprehensive Guide.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Spectroscopy.pptx food analysis technology
Profit Center Accounting in SAP S/4HANA, S4F28 Col11

DataStax: The Cassandra Validation Harness: Achieving More Stable Releases

  • 1. ©2015 DataStax. Do not distribute without consent. DataStax Philip Thompson
 Software Engineer The Cassandra Validation Harness: Achieving More Stable Releases 1
  • 2. ©2015 DataStax Release Stability • New Major Releases, X.Y.0 • Historically challenging • Few functional bugs, many “at scale” bugs • Problems with doing operator tasks while under load • 6285 - HSHA corrupt data • 10270 - C* stops compacting • 9687 - Wrong partitioner after upgrade • 9116 - Indexes lost on upgrade 2
  • 3. ©2015 DataStax Tick Tock • 3.1, 3.2, etc • Reducing scope not enough to reduce defect rate • Need to catch more bugs in testing 3
  • 4. ©2015 DataStax Test Retrospective Process • Analyzing every bug filed to the Apache C* Jira by OSS users • http://www.mail-archive.com/ dev@cassandra.apache.org/msg08106.html 4
  • 5. ©2015 DataStax Jepsen • Correctness testing • Made famous by Aphyr’s Call Me Maybe series • https://github.com/riptano/jepsen 5
  • 6. ©2015 DataStax Cassandra Dtest • Current non-unit test framework • github.com/riptano/cassandra-dtest • Python based tests, backed by CCM 6
  • 7. ©2015 DataStax CCM 7 • CCM - Cassandra Cluster Manager • https://github.com/pcmanus/ccm • Simulates a C* cluster on localhost • Starts multiple JVMs, separated with loopback addresses
  • 8. ©2015 DataStax Problems w/ existing tests • Mostly short-lived, functional tests • Difficult to coordinate testing features in parallel 8
  • 9. ©2015 DataStax CVH • Simulate a real production environment • Multiple, concurrent administrative actions, while cluster is under load • Test the entire configuration space 9
  • 11. ©2015 DataStax Bridges • How do we test a real C* cluster? • Entire lifecycle spin up/destroy • Talk to nodes, why not use existing tools • Inspiration from DataStax’s Java driver’s CCMBridge 11
  • 12. ©2015 DataStax Modules • Totally independent thread pools, that perform their own operations and validation, communicate to the harness • Signal failures, request shutdown, etc • Arbitrary modules can run in parallel, serial, or any chain of ordering 12
  • 13. ©2015 DataStax Module Validation • Data Correctness • OS and C* metrics 13
  • 14. ©2015 DataStax Test writing process • Simply write up a .yaml file that defines the modules you need run, and the options to pass them. • Code is called via reflection from yaml options • If the modules you want exist, no need to write new code. 14
  • 15. ©2015 DataStax Sample Test bridge: CCMBridge nodeCount: 3
 modules:
 - [LargeStressWriteModule]
 - [TableModule, ArbitraryStressOperationModule]
 cassandrayaml: !!map
 concurrent_reads: 1000
 moduleArgs: !!map
 ArbitraryStressOperationModule: !!map
 stress_settings: write n=1M
 ignoredErrors:
 - "RejectedExecutionException"
 requiredErrors:
 - "Could not validate" 15
  • 16. ©2015 DataStax Executor Services • Nice way to do concurrent, async message passing • Asynchronous execution of tasks in the background • Accepts Runnables as tasks, returns Futures that complete once the task is done • The calling thread can continue with its own execution, then block on the future to wait for the executor 16
  • 17. ©2015 DataStax Harness • WrappedRunnables • CompletableFuture • Receives/Handles signals from Modules • Passes messages between/to Modules • JUnit’s Parameterized Runner 17
  • 18. ©2015 DataStax Upcoming Improvements • Bridge for manipulating arbitrary, physical hardware • Attacking the test retrospective backlog • “Permanent” cluster testing • Dynamically created tests • Performance testing 18
  • 19. ©2015 DataStax CVH in action • CASSANDRA-9913 - Select * Fails to return all data • Not testable through unit tests • Caught by the LargeStressWriteModule 19
  • 20. ©2015 DataStax How to Contribute • For now, work is being done a fork, in preparation for merging into tree • https://github.com/ptnapoleon/cassandra/tree/ validation-notest • Eventually, will either be merged into C* trunk, or turned into its own codebase • Patches/PRs for code, tests, or documentation are welcome and appreciated 20
  • 21. ©2015 DataStax How to Contribute • Suggestions/Ideas for new areas to test? • We love those too 21
  • 22. ©2015 DataStax Questions? • Ask for ptnapoleon on freenode IRC #cassandra-dev • @ptnapoleon 22