Skip to content

Commit

Permalink
Paxos v2 Linearizability Violation
Browse files Browse the repository at this point in the history
patch by Benedict; reviewed by Blake Eggleston for CASSANDRA-17530
  • Loading branch information
belliottsmith committed Jul 12, 2022
1 parent f50862b commit 067121d
Show file tree
Hide file tree
Showing 20 changed files with 607 additions and 28 deletions.
43 changes: 43 additions & 0 deletions .circleci/config-2_1.yml
Expand Up @@ -200,6 +200,10 @@ j8_with_dtests_jobs: &j8_with_dtests_jobs
requires:
- start_j8_jvm_dtests
- j8_build
- j8_simulator_dtests:
requires:
- start_j8_jvm_dtests
- j8_build
- j8_jvm_dtests_vnode:
requires:
- start_j8_jvm_dtests
Expand Down Expand Up @@ -381,6 +385,9 @@ j8_pre-commit_jobs: &j8_pre-commit_jobs
- j8_unit_tests:
requires:
- j8_build
- j8_simulator_dtests:
requires:
- j8_build
- j8_jvm_dtests:
requires:
- j8_build
Expand Down Expand Up @@ -738,6 +745,15 @@ jobs:
- log_environment
- run_parallel_junit_tests

j8_simulator_dtests:
<<: *j8_small_executor
steps:
- attach_workspace:
at: /home/cassandra
- create_junit_containers
- log_environment
- run_simulator_tests

j8_jvm_dtests:
<<: *j8_small_par_executor
steps:
Expand Down Expand Up @@ -1312,6 +1328,33 @@ commands:
no_output_timeout: 15m

run_simulator_tests:
parameters:
no_output_timeout:
type: string
default: 30m
steps:
- run:
name: Run Simulator Tests
command: |
set -x
export PATH=$JAVA_HOME/bin:$PATH
time mv ~/cassandra /tmp
cd /tmp/cassandra
if [ -d ~/dtest_jars ]; then
cp ~/dtest_jars/dtest* /tmp/cassandra/build/
fi
ant test-simulator-dtest
no_output_timeout: <<parameters.no_output_timeout>>
- store_test_results:
path: /tmp/cassandra/build/test/output/
- store_artifacts:
path: /tmp/cassandra/build/test/output
destination: junitxml
- store_artifacts:
path: /tmp/cassandra/build/test/logs
destination: logs

run_junit_tests:
parameters:
target:
Expand Down
113 changes: 113 additions & 0 deletions .circleci/config.yml
Expand Up @@ -1152,6 +1152,112 @@ jobs:
- JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64
- JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64
- CASSANDRA_USE_JDK11: true
j8_simulator_dtests:
docker:
- image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest
resource_class: medium
working_directory: ~/
shell: /bin/bash -eo pipefail -l
parallelism: 1
steps:
- attach_workspace:
at: /home/cassandra
- run:
name: Determine unit Tests to Run
command: |
# reminder: this code (along with all the steps) is independently executed on every circle container
# so the goal here is to get the circleci script to return the tests *this* container will run
# which we do via the `circleci` cli tool.
rm -fr ~/cassandra-dtest/upgrade_tests
echo "***java tests***"
# get all of our unit test filenames
set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt
# split up the unit tests into groups based on the number of containers we have
set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt
set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt
echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt"
cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt
no_output_timeout: 15m
- run:
name: Log Environment Information
command: |
echo '*** id ***'
id
echo '*** cat /proc/cpuinfo ***'
cat /proc/cpuinfo
echo '*** free -m ***'
free -m
echo '*** df -m ***'
df -m
echo '*** ifconfig -a ***'
ifconfig -a
echo '*** uname -a ***'
uname -a
echo '*** mount ***'
mount
echo '*** env ***'
env
echo '*** java ***'
which java
java -version
- run:
name: Run Simulator Tests
command: |
set -x
export PATH=$JAVA_HOME/bin:$PATH
time mv ~/cassandra /tmp
cd /tmp/cassandra
if [ -d ~/dtest_jars ]; then
cp ~/dtest_jars/dtest* /tmp/cassandra/build/
fi
ant test-simulator-dtest
no_output_timeout: 30m
- store_test_results:
path: /tmp/cassandra/build/test/output/
- store_artifacts:
path: /tmp/cassandra/build/test/output
destination: junitxml
- store_artifacts:
path: /tmp/cassandra/build/test/logs
destination: logs
environment:
- ANT_HOME: /usr/share/ant
- JAVA11_HOME: /usr/lib/jvm/java-11-openjdk-amd64
- JAVA8_HOME: /usr/lib/jvm/java-8-openjdk-amd64
- LANG: en_US.UTF-8
- KEEP_TEST_DIR: true
- DEFAULT_DIR: /home/cassandra/cassandra-dtest
- PYTHONIOENCODING: utf-8
- PYTHONUNBUFFERED: true
- CASS_DRIVER_NO_EXTENSIONS: true
- CASS_DRIVER_NO_CYTHON: true
- CASSANDRA_SKIP_SYNC: true
- DTEST_REPO: https://github.com/apache/cassandra-dtest.git
- DTEST_BRANCH: trunk
- CCM_MAX_HEAP_SIZE: 1024M
- CCM_HEAP_NEWSIZE: 256M
- REPEATED_UTEST_TARGET: testsome
- REPEATED_UTEST_CLASS: null
- REPEATED_UTEST_METHODS: null
- REPEATED_UTEST_VNODES: false
- REPEATED_UTEST_COUNT: 100
- REPEATED_UTEST_STOP_ON_FAILURE: false
- REPEATED_DTEST_NAME: null
- REPEATED_DTEST_VNODES: false
- REPEATED_DTEST_COUNT: 100
- REPEATED_DTEST_STOP_ON_FAILURE: false
- REPEATED_UPGRADE_DTEST_NAME: null
- REPEATED_UPGRADE_DTEST_COUNT: 100
- REPEATED_UPGRADE_DTEST_STOP_ON_FAILURE: false
- REPEATED_JVM_UPGRADE_DTEST_CLASS: null
- REPEATED_JVM_UPGRADE_DTEST_METHODS: null
- REPEATED_JVM_UPGRADE_DTEST_COUNT: 100
- REPEATED_JVM_UPGRADE_DTEST_STOP_ON_FAILURE: false
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
j8_cqlsh-dtests-py3-with-vnodes:
docker:
- image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest
Expand Down Expand Up @@ -3772,6 +3878,10 @@ workflows:
requires:
- start_j8_jvm_dtests
- j8_build
- j8_simulator_dtests:
requires:
- start_j8_jvm_dtests
- j8_build
- j8_jvm_dtests_vnode:
requires:
- start_j8_jvm_dtests
Expand Down Expand Up @@ -3938,6 +4048,9 @@ workflows:
- j8_unit_tests:
requires:
- j8_build
- j8_simulator_dtests:
requires:
- j8_build
- j8_jvm_dtests:
requires:
- j8_build
Expand Down
113 changes: 113 additions & 0 deletions .circleci/config.yml.HIGHRES
Expand Up @@ -1152,6 +1152,112 @@ jobs:
- JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64
- JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64
- CASSANDRA_USE_JDK11: true
j8_simulator_dtests:
docker:
- image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest
resource_class: medium
working_directory: ~/
shell: /bin/bash -eo pipefail -l
parallelism: 1
steps:
- attach_workspace:
at: /home/cassandra
- run:
name: Determine unit Tests to Run
command: |
# reminder: this code (along with all the steps) is independently executed on every circle container
# so the goal here is to get the circleci script to return the tests *this* container will run
# which we do via the `circleci` cli tool.

rm -fr ~/cassandra-dtest/upgrade_tests
echo "***java tests***"

# get all of our unit test filenames
set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt

# split up the unit tests into groups based on the number of containers we have
set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt
set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt
echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt"
cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt
no_output_timeout: 15m
- run:
name: Log Environment Information
command: |
echo '*** id ***'
id
echo '*** cat /proc/cpuinfo ***'
cat /proc/cpuinfo
echo '*** free -m ***'
free -m
echo '*** df -m ***'
df -m
echo '*** ifconfig -a ***'
ifconfig -a
echo '*** uname -a ***'
uname -a
echo '*** mount ***'
mount
echo '*** env ***'
env
echo '*** java ***'
which java
java -version
- run:
name: Run Simulator Tests
command: |
set -x
export PATH=$JAVA_HOME/bin:$PATH
time mv ~/cassandra /tmp
cd /tmp/cassandra
if [ -d ~/dtest_jars ]; then
cp ~/dtest_jars/dtest* /tmp/cassandra/build/
fi
ant test-simulator-dtest
no_output_timeout: 30m
- store_test_results:
path: /tmp/cassandra/build/test/output/
- store_artifacts:
path: /tmp/cassandra/build/test/output
destination: junitxml
- store_artifacts:
path: /tmp/cassandra/build/test/logs
destination: logs
environment:
- ANT_HOME: /usr/share/ant
- JAVA11_HOME: /usr/lib/jvm/java-11-openjdk-amd64
- JAVA8_HOME: /usr/lib/jvm/java-8-openjdk-amd64
- LANG: en_US.UTF-8
- KEEP_TEST_DIR: true
- DEFAULT_DIR: /home/cassandra/cassandra-dtest
- PYTHONIOENCODING: utf-8
- PYTHONUNBUFFERED: true
- CASS_DRIVER_NO_EXTENSIONS: true
- CASS_DRIVER_NO_CYTHON: true
- CASSANDRA_SKIP_SYNC: true
- DTEST_REPO: https://github.com/apache/cassandra-dtest.git
- DTEST_BRANCH: trunk
- CCM_MAX_HEAP_SIZE: 1024M
- CCM_HEAP_NEWSIZE: 256M
- REPEATED_UTEST_TARGET: testsome
- REPEATED_UTEST_CLASS: null
- REPEATED_UTEST_METHODS: null
- REPEATED_UTEST_VNODES: false
- REPEATED_UTEST_COUNT: 100
- REPEATED_UTEST_STOP_ON_FAILURE: false
- REPEATED_DTEST_NAME: null
- REPEATED_DTEST_VNODES: false
- REPEATED_DTEST_COUNT: 100
- REPEATED_DTEST_STOP_ON_FAILURE: false
- REPEATED_UPGRADE_DTEST_NAME: null
- REPEATED_UPGRADE_DTEST_COUNT: 100
- REPEATED_UPGRADE_DTEST_STOP_ON_FAILURE: false
- REPEATED_JVM_UPGRADE_DTEST_CLASS: null
- REPEATED_JVM_UPGRADE_DTEST_METHODS: null
- REPEATED_JVM_UPGRADE_DTEST_COUNT: 100
- REPEATED_JVM_UPGRADE_DTEST_STOP_ON_FAILURE: false
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
j8_cqlsh-dtests-py3-with-vnodes:
docker:
- image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest
Expand Down Expand Up @@ -3772,6 +3878,10 @@ workflows:
requires:
- start_j8_jvm_dtests
- j8_build
- j8_simulator_dtests:
requires:
- start_j8_jvm_dtests
- j8_build
- j8_jvm_dtests_vnode:
requires:
- start_j8_jvm_dtests
Expand Down Expand Up @@ -3938,6 +4048,9 @@ workflows:
- j8_unit_tests:
requires:
- j8_build
- j8_simulator_dtests:
requires:
- j8_build
- j8_jvm_dtests:
requires:
- j8_build
Expand Down

0 comments on commit 067121d

Please sign in to comment.