Skip to content
Snippets Groups Projects
Forked from Iris / Iris
Source project has a limited visibility.

Testing Cassandra using Randomized Algorithms

This repository keeps the source code for randomized testing of Cassandra using RAPOS, POS, PCT, d-POS and taPCT algorithms.

The algorithms are implemented using the events intercepted by the [SAMC/DMCK] (https://github.com/ucare-uchicago/DMCK) model checker.

Contents

The $HOME/DMCK folder mainly contains the source code for DMCK tool in the $HOME/DMCK/src directory which we extended with randomized algorithm implementations, a compressed file for Cassandra 2.0.0 in $HOME/DMCK/dmck-target-systems directory which is the system under test and the folder $HOME/DMCK/cassandra-2.0.0, which contains some files used by DMCK, related to testing the Cassandra system (e.g. scripts to start nodes, workload files to be submitted to nodes, configurations etc).

To test the Cassandra system, the following two configuration files needs to be configured:

  • $HOME/DMCK/cassandra-2.0.0/target-sys.conf to configure DMCK test parameters. Make sure that you update the absolute paths to the files as well.

  • $HOME/DMCK/cassandra-2.0.0/scheduler.conf to configure algorithm test parameters.

Testing Cassandra

Compiling the DMCK tool:

  • Go to $home/DMCK/dmck-target-sys directory and extract cassandra-6023.tar.gz:
$ cd $home/DMCK/dmck-target-sys
$ tar -xzf cassandra-6023.tar.gz
  • Compile Cassandra:
$ cd $home/DMCK/dmck-target-sys/cassandra-6023
$ ./compile
  • Compile the DMCK tool:
$ cd $home/DMCK
$ ./compile cassandra-2.0.0

Note: Linux removes some generated temporary folders if the machine is restarted. If you want to run the tests after a restart, you should execute this compilation step again.

Running the tests:

  • (Configuration) Set the model checker parameter in the $HOME/DMCK/cassandra-2.0.0/target-sys.conf to the preferred model checker.
exploring_strategy=edu.uchicago.cs.ucare.dmck.server.TaPCTModelChecker
  • (Configuration) Set the bug-depth parameter in the $HOME/DMCK/cassandra-2.0.0/scheduler.conf file.
taPCT.depth = 4
  • (Running tests) The Cassandra system can be tested by running the following commands in the $HOME/DMCK folder:
$ cd cassandra-2.0.0
$ ./dmckRunner.sh