Skip to content

Commit 09dfd24

Browse files
authored
Add options for ScalarDB test workflows (#154)
1 parent efc0002 commit 09dfd24

File tree

3 files changed

+57
-2
lines changed

3 files changed

+57
-2
lines changed

.github/workflows/cluster-test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ on:
3535
- partition
3636
- packet
3737
- clock
38+
enable_one_phase_commit:
39+
description: 'Enable one phase commit'
40+
default: false
41+
type: boolean
3842
enable_group_commit:
3943
description: 'Enable Group commit'
4044
default: false
@@ -44,6 +48,7 @@ on:
4448
type: choice
4549
default: snapshot
4650
options:
51+
- read-committed
4752
- snapshot
4853
- serializable
4954
consistency_model:
@@ -147,9 +152,14 @@ jobs:
147152
OPTS+=" --nemesis ${{ github.event.inputs.nemesis }}"
148153
OPTS+=" --isolation-level ${{ github.event.inputs.isolation_level }}"
149154
OPTS+=" --consistency-model ${{ github.event.inputs.consistency_model }}"
155+
156+
if [ "${{ github.event.inputs.enable_one_phase_commit }}" = "true" ]; then
157+
OPTS+=" --enable-one-phase-commit"
158+
fi
150159
if [ "${{ github.event.inputs.enable_group_commit }}" = "true" ]; then
151160
OPTS+=" --enable-group-commit"
152161
fi
162+
153163
lein with-profile cluster run test \
154164
--nodes localhost \
155165
--db cluster \

.github/workflows/daily.yml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,45 +17,83 @@ jobs:
1717
- name: "Transfers_SI"
1818
workload: "transfer transfer-append"
1919
nemesis: "none partition packet clock crash"
20+
enable_one_phase_commit: false
2021
enable_group_commit: false
2122
isolation_level: "snapshot"
2223
consistency_model: "snapshot-isolation"
24+
time_limit: 600
2325
- name: "Transfers_2PC_SI"
2426
workload: "transfer-2pc transfer-append-2pc"
2527
nemesis: "none partition packet clock crash"
28+
enable_one_phase_commit: false
2629
enable_group_commit: false
2730
isolation_level: "snapshot"
2831
consistency_model: "snapshot-isolation"
32+
time_limit: 600
33+
- name: "ReadCommitted"
34+
workload: "elle-append elle-write-read"
35+
nemesis: "none partition packet clock crash"
36+
enable_one_phase_commit: false
37+
enable_group_commit: false
38+
isolation_level: "read-committed"
39+
consistency_model: "cursor-stability"
40+
time_limit: 600
41+
- name: "ReadCommitted_2PC"
42+
workload: "elle-append-2pc elle-write-read-2pc"
43+
nemesis: "none partition packet clock crash"
44+
enable_one_phase_commit: false
45+
enable_group_commit: false
46+
isolation_level: "read-committed"
47+
consistency_model: "cursor-stability"
48+
time_limit: 600
2949
- name: "RCSI"
3050
workload: "elle-append elle-write-read"
3151
nemesis: "none partition packet clock crash"
52+
enable_one_phase_commit: false
3253
enable_group_commit: false
3354
isolation_level: "snapshot"
3455
consistency_model: "cursor-stability"
56+
time_limit: 600
3557
- name: "RCSI_2PC"
3658
workload: "elle-append-2pc elle-write-read-2pc"
3759
nemesis: "none partition packet clock crash"
60+
enable_one_phase_commit: false
3861
enable_group_commit: false
3962
isolation_level: "snapshot"
4063
consistency_model: "cursor-stability"
64+
time_limit: 600
4165
- name: "Serializable"
4266
workload: "elle-append elle-write-read"
4367
nemesis: "none partition packet clock crash"
68+
enable_one_phase_commit: false
4469
enable_group_commit: false
4570
isolation_level: "serializable"
4671
consistency_model: "strict-serializable"
72+
time_limit: 600
4773
- name: "Serializable_2PC"
4874
workload: "elle-append-2pc elle-write-read-2pc"
4975
nemesis: "none partition packet clock crash"
76+
enable_one_phase_commit: false
5077
enable_group_commit: false
5178
isolation_level: "serializable"
5279
consistency_model: "strict-serializable"
80+
time_limit: 600
81+
- name: "OnePhaseCommit"
82+
workload: "elle-append elle-write-read"
83+
nemesis: "none partition packet clock crash"
84+
enable_one_phase_commit: true
85+
enable_group_commit: false
86+
isolation_level: "snapshot"
87+
consistency_model: "cursor-stability"
88+
time_limit: 600
5389
- name: "GroupCommit"
5490
workload: "elle-append elle-write-read"
5591
nemesis: "none partition packet clock crash"
92+
enable_one_phase_commit: false
5693
enable_group_commit: true
5794
isolation_level: "serializable"
5895
consistency_model: "strict-serializable"
96+
time_limit: 600
5997

6098
steps:
6199
- uses: actions/checkout@v4
@@ -147,11 +185,14 @@ jobs:
147185
done
148186
OPTS+=" --isolation-level ${{ matrix.tests.isolation_level }}"
149187
OPTS+=" --consistency-model ${{ matrix.tests.consistency_model }}"
188+
if [ "${{ matrix.tests.enable_one_phase_commit }}" = "true" ]; then
189+
OPTS+=" --enable-one-phase-commit"
190+
fi
150191
if [ "${{ matrix.tests.enable_group_commit }}" = "true" ]; then
151192
OPTS+=" --enable-group-commit"
152193
fi
153194
lein with-profile cluster run test \
154-
--time-limit 600 \
195+
--time-limit ${{ matrix.tests.time_limit }} \
155196
--nodes localhost \
156197
--db cluster \
157198
--concurrency 5 \

scalardb/src/scalardb/db/cluster.clj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@
5454
new-db-props (-> values
5555
(get-in path)
5656
(str "\nscalar.db.consensus_commit.isolation_level="
57-
(-> test :isolation-level name str/upper-case)))]
57+
(-> test
58+
:isolation-level
59+
name
60+
str/upper-case
61+
(str/replace #"-" "_"))))]
5862
(assoc-in values path new-db-props)))
5963

6064
(defn- install!

0 commit comments

Comments
 (0)