Skip to content

Commit 6266205

Browse files
authored
Merge branch 'main' into java-21-virtual-threads
2 parents 0d098e6 + b4b3668 commit 6266205

File tree

78 files changed

+2809
-428
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+2809
-428
lines changed

.github/workflows/maven.yml

+89-12
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ on:
3232
type: string
3333

3434
env:
35-
POM_VERSION: 2021-SNAPSHOT
36-
JAVA_VERSION: 17
35+
POM_VERSION: 2023-SNAPSHOT
36+
JAVA_VERSION: 21
3737
ERRORS_THRESHOLD: 0.01
3838

3939
jobs:
@@ -44,7 +44,7 @@ jobs:
4444
uses: actions/checkout@v4
4545

4646
- name: Set up JDK
47-
uses: actions/setup-java@v3
47+
uses: actions/setup-java@v4
4848
with:
4949
java-version: ${{env.JAVA_VERSION}}
5050
cache: 'maven'
@@ -58,13 +58,13 @@ jobs:
5858
runs-on: ubuntu-latest
5959
strategy:
6060
matrix:
61-
profile: [ 'cockroachdb', 'mariadb', 'mysql', 'postgres', 'spanner', 'phoenix', 'sqlserver', 'sqlite' ]
61+
profile: [ 'cockroachdb', 'mariadb', 'mysql', 'oracle', 'phoenix', 'postgres', 'spanner', 'sqlite', 'sqlserver' ]
6262
steps:
6363
- name: Checkout repo
6464
uses: actions/checkout@v4
6565

6666
- name: Set up JDK
67-
uses: actions/setup-java@v3
67+
uses: actions/setup-java@v4
6868
with:
6969
java-version: ${{env.JAVA_VERSION}}
7070
cache: 'maven'
@@ -105,7 +105,7 @@ jobs:
105105
rm -rf benchbase-sqlite.tgz
106106
107107
- name: Set up JDK
108-
uses: actions/setup-java@v3
108+
uses: actions/setup-java@v4
109109
with:
110110
java-version: ${{env.JAVA_VERSION}}
111111
distribution: 'temurin'
@@ -175,7 +175,7 @@ jobs:
175175
rm -rf benchbase-mariadb.tgz
176176
177177
- name: Set up JDK
178-
uses: actions/setup-java@v3
178+
uses: actions/setup-java@v4
179179
with:
180180
java-version: ${{env.JAVA_VERSION}}
181181
distribution: 'temurin'
@@ -243,7 +243,7 @@ jobs:
243243
rm -rf benchbase-mysql.tgz
244244
245245
- name: Set up JDK
246-
uses: actions/setup-java@v3
246+
uses: actions/setup-java@v4
247247
with:
248248
java-version: ${{env.JAVA_VERSION}}
249249
distribution: 'temurin'
@@ -271,6 +271,83 @@ jobs:
271271
fi
272272
./scripts/check_histogram_results.sh results/histograms.json $ERRORS_THRESHOLD
273273
274+
## ----------------------------------------------------------------------------------
275+
## ORACLE
276+
## ----------------------------------------------------------------------------------
277+
oracle:
278+
needs: package-and-upload
279+
runs-on: ubuntu-latest
280+
strategy:
281+
fail-fast: false
282+
matrix:
283+
benchmark: [ 'auctionmark', 'epinions', 'hyadapt', 'otmetrics', 'resourcestresser', 'seats', 'sibench', 'smallbank', 'tatp', 'tpcc', 'twitter', 'voter', 'wikipedia', 'ycsb', 'templated' ]
284+
services:
285+
oracle:
286+
image: gvenzl/oracle-xe:21.3.0-slim-faststart
287+
ports:
288+
- "1521:1521"
289+
- "5500:5500"
290+
env:
291+
ORACLE_PASSWORD: password
292+
ORACLE_CHARACTERSET: AL32UTF8
293+
APP_USER: benchbase
294+
APP_USER_PASSWORD: password
295+
options: >-
296+
--name oracle
297+
--health-cmd "echo exit | sqlplus benchbase/password@xepdb1 | grep Connected"
298+
--health-interval 10s
299+
--health-timeout 5s
300+
--health-retries 5
301+
--health-start-period 5s
302+
steps:
303+
- name: Download artifact
304+
uses: actions/download-artifact@v3
305+
with:
306+
name: benchbase-oracle
307+
308+
- name: Extract artifact
309+
run: |
310+
tar xvzf benchbase-oracle.tgz --strip-components=1
311+
312+
- name: Delete artifact
313+
run: |
314+
rm -rf benchbase-oracle.tgz
315+
316+
- name: Set up user reset script
317+
run: |
318+
docker cp config/oracle/scripts/reset.sql oracle:/opt/oracle/reset.sql
319+
320+
- name: Set up JDK
321+
uses: actions/setup-java@v4
322+
with:
323+
java-version: ${{env.JAVA_VERSION}}
324+
distribution: 'temurin'
325+
326+
- name: Run benchmark
327+
run: |
328+
docker exec oracle sqlplus "sys/password@xepdb1 as sysdba" @reset.sql
329+
# For templated benchmarks, we need to preload some data for the test since by design, templated benchmarks do not support the 'load' operation
330+
# In this case, we load the tpcc data.
331+
if [[ ${{matrix.benchmark}} == templated ]]; then
332+
java -jar benchbase.jar -b tpcc -c config/oracle/sample_tpcc_config.xml --create=true --load=true --execute=false --json-histograms results/histograms.json
333+
java -jar benchbase.jar -b ${{matrix.benchmark}} -c config/oracle/sample_${{matrix.benchmark}}_config.xml --create=false --load=false --execute=true --json-histograms results/histograms.json
334+
else
335+
java -jar benchbase.jar -b ${{matrix.benchmark}} -c config/oracle/sample_${{matrix.benchmark}}_config.xml --create=true --load=true --execute=true --json-histograms results/histograms.json
336+
fi
337+
# FIXME: Reduce the error rate so we don't need these overrides.
338+
if [ ${{matrix.benchmark}} == auctionmark ]; then
339+
ERRORS_THRESHOLD=0.04
340+
elif [ ${{matrix.benchmark}} == tatp ]; then
341+
ERRORS_THRESHOLD=0.05
342+
elif [ ${{matrix.benchmark}} == tpcc ]; then
343+
ERRORS_THRESHOLD=0.03
344+
elif [ ${{matrix.benchmark}} == resourcestresser ]; then
345+
ERRORS_THRESHOLD=0.04
346+
elif [ ${{matrix.benchmark}} == wikipedia ]; then
347+
ERRORS_THRESHOLD=0.02
348+
fi
349+
./scripts/check_histogram_results.sh results/histograms.json $ERRORS_THRESHOLD
350+
274351
## ----------------------------------------------------------------------------------
275352
## POSTGRESQL
276353
## ----------------------------------------------------------------------------------
@@ -310,7 +387,7 @@ jobs:
310387
rm -rf benchbase-postgres.tgz
311388
312389
- name: Set up JDK
313-
uses: actions/setup-java@v3
390+
uses: actions/setup-java@v4
314391
with:
315392
java-version: ${{env.JAVA_VERSION}}
316393
distribution: 'temurin'
@@ -370,7 +447,7 @@ jobs:
370447
rm -rf benchbase-cockroachdb.tgz
371448
372449
- name: Set up JDK
373-
uses: actions/setup-java@v3
450+
uses: actions/setup-java@v4
374451
with:
375452
java-version: ${{env.JAVA_VERSION}}
376453
distribution: 'temurin'
@@ -427,7 +504,7 @@ jobs:
427504
rm -rf benchbase-sqlserver.tgz
428505
429506
- name: Set up JDK
430-
uses: actions/setup-java@v3
507+
uses: actions/setup-java@v4
431508
with:
432509
java-version: ${{env.JAVA_VERSION}}
433510
distribution: 'temurin'
@@ -481,7 +558,7 @@ jobs:
481558
runs-on: ubuntu-latest
482559
env:
483560
DOCKER_BUILDKIT: 1
484-
BENCHBASE_PROFILES: 'cockroachdb mariadb mysql postgres spanner phoenix sqlserver sqlite'
561+
BENCHBASE_PROFILES: 'cockroachdb mariadb mysql oracle phoenix postgres spanner sqlite sqlserver'
485562
CONTAINER_REGISTRY_NAME: ${{ secrets.ACR_LOGINURL }}
486563
services:
487564
postgres: # https://hub.docker.com/_/postgres

CONTRIBUTORS.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@
1919
We also acknowledge contributions from the following collaborators:
2020

2121
+ [Florian Funke](http://www3.in.tum.de/~funkef/)
22-
+ [Michael Seibold](http://www3.in.tum.de/~seibold/)
22+
+ [Michael Seibold](http://www3.in.tum.de/~seibold/)
23+
+ [Oracle](https://github.com/oracle) (Copyright (c) 2023, Oracle and/or its affiliates.)

config/mariadb/sample_templated_config.xml

+10-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<work>
2525
<time>10</time>
2626
<rate>100</rate>
27-
<weights>30,20,10,30,10</weights>
27+
<weights>20,20,10,10,10,10,10,10</weights>
2828
</work>
2929
</works>
3030

@@ -45,5 +45,14 @@
4545
<transactiontype>
4646
<name>GetItemByPrice</name>
4747
</transactiontype>
48+
<transactiontype>
49+
<name>UpdateItemPrice</name>
50+
</transactiontype>
51+
<transactiontype>
52+
<name>DeleteItem</name>
53+
</transactiontype>
54+
<transactiontype>
55+
<name>InsertItem</name>
56+
</transactiontype>
4857
</transactiontypes>
4958
</parameters>

config/mysql/sample_templated_config.xml

+10-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<work>
2525
<time>10</time>
2626
<rate>100</rate>
27-
<weights>30,20,10,30,10</weights>
27+
<weights>20,20,10,10,10,10,10,10</weights>
2828
</work>
2929
</works>
3030

@@ -45,5 +45,14 @@
4545
<transactiontype>
4646
<name>GetItemByPrice</name>
4747
</transactiontype>
48+
<transactiontype>
49+
<name>UpdateItemPrice</name>
50+
</transactiontype>
51+
<transactiontype>
52+
<name>DeleteItem</name>
53+
</transactiontype>
54+
<transactiontype>
55+
<name>InsertItem</name>
56+
</transactiontype>
4857
</transactiontypes>
4958
</parameters>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?xml version="1.0"?>
2+
<parameters>
3+
4+
<!-- Connection details -->
5+
<type>ORACLE</type>
6+
<driver>oracle.jdbc.OracleDriver</driver>
7+
<url>jdbc:oracle:thin:@localhost:1521/xepdb1</url>
8+
<username>benchbase</username>
9+
<password>password</password>
10+
<isolation>TRANSACTION_SERIALIZABLE</isolation>
11+
<batchsize>128</batchsize>
12+
13+
<!-- Scalefactor in AuctionMark scales by *1000 the number of customers-->
14+
<scalefactor>1</scalefactor>
15+
16+
<!-- The workload -->
17+
<terminals>1</terminals>
18+
<works>
19+
<work>
20+
<time>60</time>
21+
<rate>10000</rate>
22+
<weights>45, 10, 20, 2, 1, 4, 10, 5, 3</weights>
23+
</work>
24+
</works>
25+
26+
<!-- AuctionMark Procedures declaration -->
27+
<transactiontypes>
28+
<transactiontype>
29+
<name>GetItem</name>
30+
</transactiontype>
31+
<transactiontype>
32+
<name>GetUserInfo</name>
33+
</transactiontype>
34+
<transactiontype>
35+
<name>NewBid</name>
36+
</transactiontype>
37+
<transactiontype>
38+
<name>NewComment</name>
39+
</transactiontype>
40+
<transactiontype>
41+
<name>NewCommentResponse</name>
42+
</transactiontype>
43+
<transactiontype>
44+
<name>NewFeedback</name>
45+
</transactiontype>
46+
<transactiontype>
47+
<name>NewItem</name>
48+
</transactiontype>
49+
<transactiontype>
50+
<name>NewPurchase</name>
51+
</transactiontype>
52+
<transactiontype>
53+
<name>UpdateItem</name>
54+
</transactiontype>
55+
</transactiontypes>
56+
</parameters>

0 commit comments

Comments
 (0)