Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slowdown writes based on WBM's dirty memory usage #164

Closed
wants to merge 229 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
229 commits
Select commit Hold shift + click to select a range
b3c68d8
Conditionally declare and define variable that is unused in LITE mode…
hx235 Apr 18, 2022
65a3e21
Release note for #9546 (#9872)
pdillinger Apr 19, 2022
14fb86d
Add release note for #9747 (#9874)
Apr 20, 2022
1ef888f
Fix issue of opening too many files in BlockBasedTableReaderCapMemory…
hx235 Apr 20, 2022
5898845
Add experimental new FS API AbortIO to cancel read request (#9901)
akankshamahajan15 Apr 25, 2022
34681a1
Add stats related to async prefetching (#9845)
akankshamahajan15 Apr 26, 2022
3620e69
Revert open logic changes in #9634 (#9906)
ajkr Apr 26, 2022
f38f557
Update version.h and HISTORY.md for 7.2.1
akankshamahajan15 Apr 26, 2022
7105922
Fix bug in async_io path which reads incorrect length (#9916)
akankshamahajan15 Apr 28, 2022
f2f26b1
Update HISTORY.md and version.h to 7.2.2
akankshamahajan15 Apr 28, 2022
cbccf66
Init
rtpro May 24, 2022
2b875b9
SPDB-126: status: don't include private headers from public headers
isaac-io Jun 15, 2021
648ca75
build: fix clang diagnostics
isaac-io Jun 20, 2021
0fbf6c3
tests: add initialisation in gtest in order to resolve a GCC diagnostic
isaac-io May 19, 2021
6d6c2a7
tests: resolve GCC diagnostics
isaac-io May 20, 2021
e63a5d4
build: compilation fixes
Yuval-Ariel May 17, 2022
9d0e6ff
SPDB-165: build: fix building on CentOS 7 with old versions of gflags…
isaac-io Jul 6, 2021
9717ae3
SPDB-556: build: fix clang 12 compilation errors
isaac-io Mar 9, 2022
185244e
SPDB-553: build: support sccache in the CMake config
isaac-io Mar 8, 2022
83319f7
SPDB-181: tests: add missing `override` specifier in gtest to fix a c…
isaac-io Jul 8, 2021
7dc005e
SPDB-87: build: fix clang compilation errors
isaac-io Apr 14, 2021
336cab6
initial CI
Yuval-Ariel Jun 22, 2022
1525822
added PORTABLE=1 flag to make for fuzz test
nathan-bo Jun 23, 2022
1837ea1
#15: fault_injection_fs: avoid division by zero in DropRandomUnsynced…
Yuval-Ariel Jun 23, 2022
f419c8a
changed fuzz-test according to new workplan
nathan-bo Jun 26, 2022
60975a8
fixed regex on reading fuzz log
nathan-bo Jun 26, 2022
f8df6ca
customizable_test: fix breakage caused by SPDB-556 (#27)
isaac-io Jun 23, 2022
835bcf8
added commit hash to logs uploaded to s3
nathan-bo Jun 26, 2022
24c6f46
added util-linux and run lscpu script for ci pipeline
nathan-bo Jun 27, 2022
b223204
fixed util-linux installation
nathan-bo Jun 27, 2022
3204f06
added "-DPORTABLE=1" flag to ci pipeline
nathan-bo Jun 28, 2022
d580a84
Update issue templates
rtpro Jun 28, 2022
d98ea0f
Update issue templates
rtpro Jun 28, 2022
7f71b17
Update new_release_line.yml
nathan-bo Jun 28, 2022
e41f652
Update new_release_line.yml
nathan-bo Jun 28, 2022
e462797
Update new_release_line.yml
nathan-bo Jun 28, 2022
842cfb6
Update new_release_line.yml
nathan-bo Jun 28, 2022
4bde119
Update new_release_line.yml
nathan-bo Jun 28, 2022
8469569
Update new_release_line.yml
nathan-bo Jun 28, 2022
89cf25f
Update issue templates
rtpro Jun 29, 2022
1abecc1
SPDB-209: crash_test: bail if the run failed before the driver killed it
isaac-io Aug 22, 2021
01f919d
SPDB-225: crash_test: backup last two db states
Yuval-Ariel Jun 14, 2022
41214a8
SPDB-229: crash_test: add timestamp and PID to command execution output
isaac-io Oct 6, 2021
34a6caf
SPDB-231: crash_test: clean left-over copies of the database on success
isaac-io Oct 6, 2021
28e2cb2
SPDB-235: crash_test: remove redundant command execution print
isaac-io Oct 6, 2021
9f14431
SPDB-266: crash_test: fix parsing of boolean arguments
isaac-io Oct 13, 2021
7de4faa
SPDB-331: db_stress: fix compare_full_db_state_snapshot with batched …
Yuval-Ariel Jun 27, 2022
a865c38
SPDB-331: crash_test: don't toggle test_batches_snapshots
Yuval-Ariel Jun 23, 2022
c161f33
SPDB-241: crash_test: add narrow crash test
Yuval-Ariel Jun 23, 2022
28a8caa
SPDB-284: crash_test: increase stress test coverage
Yuval-Ariel Jun 14, 2022
f5978a8
SPDB-495: crash_test: disable test_batches_snapshots when cf_consiste…
Yuval-Ariel Jun 14, 2022
d2d6e41
SPDB-469: db_stress: add data_block_index_type
Yuval-Ariel Jan 20, 2022
87feb2b
stress_test: fix test_cf_consistency msg and ..
Yuval-Ariel Jun 27, 2022
4fa1f43
38 update new issues template to a generic template (#39)
rtpro Jun 30, 2022
430d496
Update ci_pipeline.yml
nathan-bo Jun 30, 2022
55e57eb
Update sanity_check.yml
nathan-bo Jun 30, 2022
75f3ec5
Update sanity_check.yml
nathan-bo Jun 30, 2022
5a890ba
Update sanity_check.yml
nathan-bo Jun 30, 2022
3b21ce4
Update sanity_check.yml
nathan-bo Jun 30, 2022
78eda82
Update sanity_check.yml
nathan-bo Jun 30, 2022
33d5e9c
Update sanity_check.yml
nathan-bo Jun 30, 2022
da0b9aa
Update sanity_check.yml
nathan-bo Jun 30, 2022
ac592b3
Update sanity_check.yml
nathan-bo Jun 30, 2022
dd30aef
Update sanity_check.yml
nathan-bo Jun 30, 2022
e047c97
Update sanity_check.yml
nathan-bo Jun 30, 2022
b766dc5
Update sanity_check.yml
nathan-bo Jun 30, 2022
d94f1c9
Update sanity_check.yml
nathan-bo Jun 30, 2022
ccca569
Update sanity_check.yml
nathan-bo Jun 30, 2022
3ab5f0d
Update sanity_check.yml
nathan-bo Jun 30, 2022
9ba74d5
Update sanity_check.yml
nathan-bo Jun 30, 2022
a5cca6e
Update sanity_check.yml
nathan-bo Jun 30, 2022
92eea7c
Update sanity_check.yml
nathan-bo Jun 30, 2022
4c1d203
Update sanity_check.yml
nathan-bo Jun 30, 2022
d7fc88b
Update test_fuzz.yml
nathan-bo Jun 30, 2022
96bd26c
Delete fuzz.yml
nathan-bo Jun 30, 2022
de7ab51
Delete aws-test.yml
nathan-bo Jun 30, 2022
e9306e6
CI: Merge pull request #40 from speedb-io/devops-dev
Yuval-Ariel Jul 3, 2022
f613e2a
Update full-tests.yml
nathan-bo Jul 4, 2022
330e7c1
Create full-tests.yml
nathan-bo Jul 4, 2022
7037f0e
Update full-tests.yml
nathan-bo Jul 4, 2022
fb43a7c
Update full-tests.yml
nathan-bo Jul 4, 2022
7811a61
Update full-tests.yml
nathan-bo Jul 4, 2022
69b93ed
Update full-tests.yml
nathan-bo Jul 4, 2022
b0488d0
Update full-tests.yml
nathan-bo Jul 4, 2022
0c87e97
git: add clangd cache to .gitignore
isaac-io Apr 6, 2021
e62135c
db_impl: use unique_ptr in DBImpl::Open for nicer memory management
isaac-io Mar 25, 2021
22870b4
column_family: make the comparison of the SuperVersion pointer explicit
Yuval-Ariel Jun 6, 2022
3647603
Rename rocksdb threads to speedb
speedbmike Jan 31, 2021
e3894d4
log: change log header to SpeeDB
Yuval-Ariel May 17, 2022
d915ad7
SPDB-467: Report the metadata_cache_options table options to the trace
udi-speedb Jan 17, 2022
883d53d
SPDB-538: Support configuration of metadata-cache-options in db_bench
udi-speedb Feb 28, 2022
4e774f8
SPDB-632: Print write_buffer_manager size to LOG
Yuval-Ariel Apr 17, 2022
19ff1c3
SPDB-347: Add a version number to our builds
Yuval-Ariel May 26, 2022
0321fe8
SPDB-382: Exclude third party code from the checks
Yuval-Ariel Jul 3, 2022
b36e07a
Update full-tests.yml
nathan-bo Jul 4, 2022
ee64e9e
Update full-tests.yml
nathan-bo Jul 4, 2022
1bbe7e3
Update sanity_check.yml
nathan-bo Jul 4, 2022
d8967bf
Update sanity_check.yml
nathan-bo Jul 4, 2022
f7a182f
Update sanity_check.yml
nathan-bo Jul 4, 2022
aa69a84
Update full-tests.yml
nathan-bo Jul 5, 2022
8eaf613
Create release_to_qa.yml
nathan-bo Jul 5, 2022
9fd9c54
Update full-tests.yml
nathan-bo Jul 5, 2022
18552f0
Update full-tests.yml
nathan-bo Jul 5, 2022
a4e27ce
added manual trigger to sanity
nathan-bo Jul 11, 2022
1d50d9c
Update sanity_check.yml
nathan-bo Jul 12, 2022
2780c24
Update sanity_check.yml
nathan-bo Jul 12, 2022
7f424b7
SPDB-270: db_bench: add SeekRandomWriteRandom test
Yuval-Ariel Jul 12, 2022
b1a647f
Update sanity_check.yml
nathan-bo Jul 13, 2022
b826def
Update README to contain a quick start guide for speedb
Jun 20, 2022
1b01213
customizable_test: revert the offsetof() build-related fixes (#55)
isaac-io Jul 14, 2022
0082f15
Update sanity_check.yml
nathan-bo Jul 17, 2022
d49deef
Update ci_pipeline.yml
nathan-bo Jul 17, 2022
8449449
Update and rename full-tests.yml to qa-tests.yml
nathan-bo Jul 17, 2022
2de182d
Update qa-tests.yml
nathan-bo Jul 17, 2022
d2130f9
Update and rename release_to_qa.yml to perf-test.yml
nathan-bo Jul 17, 2022
6fd043a
Update ci_pipeline.yml
nathan-bo Jul 17, 2022
bc476d6
Update ci_pipeline.yml
nathan-bo Jul 17, 2022
f0a21b7
Update ci_pipeline.yml
nathan-bo Jul 17, 2022
2dc341b
Update ci_pipeline.yml
nathan-bo Jul 17, 2022
907f035
Update ci_pipeline.yml
nathan-bo Jul 17, 2022
841a095
Update ci_pipeline.yml
nathan-bo Jul 17, 2022
9bf839d
Update ci_pipeline.yml
nathan-bo Jul 17, 2022
74c0faa
Update ci_pipeline.yml
nathan-bo Jul 17, 2022
a7d7432
Update ci_pipeline.yml
nathan-bo Jul 17, 2022
053859f
Update ci_pipeline.yml
nathan-bo Jul 17, 2022
2184a0f
Update ci_pipeline.yml
nathan-bo Jul 17, 2022
d1f910a
Update ci_pipeline.yml
nathan-bo Jul 17, 2022
38c0a6e
Update ci_pipeline.yml
nathan-bo Jul 17, 2022
390bbfd
Update ci_pipeline.yml
nathan-bo Jul 17, 2022
11ef20c
SPDB-180: general: avoid comparing Status using == as it only compare…
isaac-io Jul 8, 2021
2c6de6d
SPDB-180: tests: avoid comparing Status using == as it only compares …
isaac-io Jul 13, 2022
ad14ca2
SPDB-156: db_test: add test for - forward the incomplete status on no_io
Yuval-Ariel May 17, 2022
06f6610
SPDB-341: optimistic_transaction_example: fix snapshots leak
isaac-io Nov 16, 2021
1b8e0f3
SPDB-96: ldb: fix get to print the entire value
isaac-io Apr 27, 2021
aee8d91
SPDB-534: db_bench: fix rocksdb bug of last_ref assertion
Yuval-Ariel Feb 23, 2022
bc23e15
SPDB 521: db_bench: fix SeekRandom and ReadRandomWriteRandom
Yuval-Ariel Jun 20, 2022
d78228d
mutable_db_options: fix a Clang 14 build error (#57)
isaac-io Jul 14, 2022
cd39c7b
Update ci_pipeline.yml
nathan-bo Jul 18, 2022
aefc637
Update ci_pipeline.yml
nathan-bo Jul 18, 2022
8d35687
Update ci_pipeline.yml
nathan-bo Jul 18, 2022
f7768c3
Update qa-tests.yml
nathan-bo Jul 18, 2022
4e068dc
Update issue templates
rtpro Jul 19, 2022
8abae02
Update ci_pipeline.yml
nathan-bo Jul 19, 2022
1d161e4
Update ci_pipeline.yml
nathan-bo Jul 20, 2022
d4a09f7
Update ci_pipeline.yml
nathan-bo Jul 20, 2022
9b3f7e0
Create versioning.yml
nathan-bo Jul 20, 2022
916ec97
Update ci_pipeline.yml
nathan-bo Jul 20, 2022
a7344b2
Update new_release_line.yml
nathan-bo Jul 20, 2022
19d47b3
Update test_fuzz.yml
nathan-bo Jul 20, 2022
744d655
Update versioning.yml
nathan-bo Jul 20, 2022
a85196c
Update ci_pipeline.yml
nathan-bo Jul 20, 2022
2edae52
Update ci_pipeline.yml
nathan-bo Jul 20, 2022
1960018
Update versioning.yml
nathan-bo Jul 20, 2022
4f0a57c
Update ci_pipeline.yml
nathan-bo Jul 20, 2022
e85eaab
Merge branch 'main' into devops-dev
nathan-bo Jul 20, 2022
dbf5e79
Merge pull request #62 from speedb-io/devops-dev
nathan-bo Jul 20, 2022
7115af7
optimize memtable switch latency
ayulas Jun 28, 2022
ee70d7a
Update sanity_check.yml
nathan-bo Jul 24, 2022
bdd716f
Merge pull request #25 from speedb-io/14-import-shorten-memtable-swit…
assaf-speedb Jul 25, 2022
891cae9
db_bench: reset the last operation time where rate limiting is applied
hilikspdb Jul 10, 2022
73d762f
Update issue templates
rtpro Jul 26, 2022
7ce6ac4
memtable: revert the changes introduced in PR #25 (#76)
isaac-io Jul 27, 2022
be624e0
Add ability to create MemTableFactory from URI/string to tools
mrambacher Jul 27, 2022
19e4b9b
version: remove superfluous build property
isaac-io Jul 27, 2022
444ffd4
cmake: use the old plugin infra and add support for *_FUNC registrati…
isaac-io Jul 27, 2022
39b9177
spdb memtable: add a new hash-based memtable
ayulas Aug 4, 2021
5a2dd3f
build: always add the Speedb plugin to the build (#87)
isaac-io Jul 31, 2022
851704d
crash_test: add the new memtable as a random choice (#89)
isaac-io Jul 31, 2022
5d78425
spdb_memtable: fix an unused parameter issue (#91)
isaac-io Jul 31, 2022
1c7a33a
crash_test: fix incorrect passing of the memtablerep argument (#93)
isaac-io Aug 1, 2022
21c6bd5
crash_test: remove the hash-based memtable from crash test (#98)
isaac-io Aug 1, 2022
8ca6147
fixed tests not failing pipelines
Aug 1, 2022
993d864
Devops ci/add build tools (#104)
nathan-bo Aug 3, 2022
299d7e6
ci: add a /var/tmp volume to the QA tests to fix tests failing (#107)
isaac-io Aug 3, 2022
4866126
new release line network hotfix (#109)
nathan-bo Aug 4, 2022
3fbf4ea
release: publish version 2.0.0
isaac-io Aug 4, 2022
d2c422a
Create README.md
rtpro Aug 3, 2022
0a7b4eb
Update README.md
rtpro Aug 9, 2022
f208447
#53: Update contributing guide (#59)
isaac-io Aug 16, 2022
98c7bde
Update README.md
rtpro Aug 17, 2022
643d7a9
Update CODE_OF_CONDUCT.md
rtpro Aug 18, 2022
7281a30
build: fix the java test target dependencies (#128)
isaac-io Aug 19, 2022
5c529bb
flush_job: do not roll back memtable flush on CF drop and DB shutdown…
isaac-io Aug 18, 2022
a618a8b
Update test_fuzz.yml
nathan-bo Aug 22, 2022
36c02c4
bloom_test: fix compilation error with GCC 12 (#136)
isaac-io Aug 24, 2022
d606150
build: pick Makefile cleanup changes from upstream (#118)
pdillinger May 6, 2022
f160af2
build: clean up the Makefile a bit (#118)
isaac-io Aug 9, 2022
9f4c0f9
build: allow setting the path to GNU Parallel in the Makefile (#118)
isaac-io Aug 10, 2022
f09eb89
licence: remove the GPL as an alternative licence (#118)
isaac-io Aug 9, 2022
56b1f3d
docs: update license files to comply with Apache 2.0 (#111)
rtpro Aug 25, 2022
e064ed3
Adding logo to readme (#135)
rtpro Aug 30, 2022
8554fcf
ci: move fuzz testing to reusable workflow (#133)
nathan-bo Sep 5, 2022
4691752
plugins: add Plugin Tests to builds (#123)
mrambacher Sep 13, 2022
6f3f82f
makefile: avoid setting TEST_TMPDIR unnecessarily (#140)
isaac-io Aug 25, 2022
3c73576
build: replace usages of egrep with grep -E (#166)
isaac-io Sep 16, 2022
4554ea0
crash_test: clean up DB copies in whitebox and narrow test (#159)
isaac-io Sep 19, 2022
d3a1086
#34: set purges as Pri::Low
Yuval-Ariel Jun 28, 2022
f349b10
db: Fixes for db_test2 and deletefile_test
AmnonHanuhov Sep 6, 2022
6810fd6
Accurate memory tracking of immutable memory
udi-speedb Aug 17, 2022
cfe55ca
Update logo dark mode
rtpro Sep 28, 2022
6359b58
Update logos
rtpro Sep 28, 2022
2858956
db_bench: allow setting avoid_unnecessary_blocking_io (#183)
isaac-io Sep 29, 2022
91414a1
makefile: fix shell tab-completions (#147)
isaac-io Aug 30, 2022
36cfb09
makefile: fix parallel `make check` failing on the first run (#177)
isaac-io Sep 23, 2022
f281c00
fix a typo
jsteemann Sep 30, 2022
36d2523
docs: fix a broken link in the contributing guide (#153)
dinga-dinga Oct 3, 2022
62aa766
docs: update HISTORY.md (#189)
bosmatt Oct 3, 2022
0452abc
CI: run stress tests for 1hr instead of 500secs
Yuval-Ariel Oct 3, 2022
fb0127d
cmake: allow running the tests in parallel like in the Makefile (#102)
isaac-io Aug 2, 2022
3132712
makefile: rework the dependency graph for faster test runs startup (#…
isaac-io Aug 22, 2022
f8e2e97
tools: Make FilterPolicy settable via URI/CreateFromString (#71)
mrambacher Jul 28, 2022
4fe26db
options: fix documentation from #34 purges set to LOW
Yuval-Ariel Oct 20, 2022
2868d10
options: change the default value for compaction threads to 8 (#169)
isaac-io Oct 19, 2022
13cf291
Speedb's Paired Block Bloom
udi-speedb Jul 11, 2022
a54d76c
tests: fix breakage caused by the compaction threads value change (#197)
isaac-io Oct 23, 2022
29abf78
paired_filter: fix copyright and licence headers (#199) (#204)
isaac-io Oct 24, 2022
aab78bc
build: clean up the build configuration to allow rebranding (#64)
isaac-io Aug 25, 2022
1b22426
build: rename artefacts from RocksDB to Speedb (#64)
isaac-io Jul 25, 2022
388f09c
scripts: rename RocksDB references to Speedb (#64)
isaac-io Jul 25, 2022
307bf01
general: replace RocksDB references in strings with Speedb (#64)
isaac-io Jul 25, 2022
1169c43
tools: replace RocksDB version information with the Speedb version (#64)
isaac-io Jul 25, 2022
a772e84
build: update zlib to 1.12.3 (#206)
isaac-io Oct 26, 2022
2a80c56
Added questions section to the README file
bosmatt Oct 26, 2022
b2f914c
ci: fix the release pipeline
isaac-io Oct 26, 2022
7984fcc
release: publish version 2.1.0
Oct 26, 2022
f57f24c
cmake: clean up on successful runs and randomise test scheduling (#202)
isaac-io Oct 24, 2022
9c31d38
Update README.md (#212)
bosmatt Oct 31, 2022
f96cb6a
Slowdown writes based on WBM's dirty memory usage (#114)
udi-speedb Sep 11, 2022
d3415be
Fixes resulting from work on flushes (#114)
udi-speedb Oct 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1.
2.
3.
4.

**Expected behavior**
A clear and concise description of what you expected to happen.

**System (please complete the following information):**
- OS: [e.g. RHEL8.6]
- Hardware [e.g. Intel Xeon Ice Lake, 64GB, NVMe]

**Additional context**
Add any other context about the problem here.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

Owner:

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
Binary file added .github/speedb-b.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/speedb-bee-dark.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/speedb-bee.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/speedb-logo-dark.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/speedb-logo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
112 changes: 112 additions & 0 deletions .github/workflows/artifact-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Create release artifacts

on:
push:
tags:
- 'speedb/v*'

permissions:
contents: write # Needed for release assets upload
id-token: write # Needed for AWS credentials setting

jobs:
build:
runs-on: [self-hosted, ubuntu, asrunner]

container:
image: centos:7.9.2009

steps:
- name: pre
run: |
yum install -y centos-release-scl epel-release
yum install -y make devtoolset-11-gcc-c++ \
coreutils wget unzip which git python3 openssl openssl-devel \
libzstd-devel lz4-devel snappy-devel zlib-devel \
java-1.8.0-openjdk-devel
echo "PATH=/opt/rh/devtoolset-11/root/usr/bin:${PATH}" >> $GITHUB_ENV
echo "RELEASE_VERSION=${GITHUB_REF_NAME#speedb/v}" >> $GITHUB_ENV

- name: Install CMake
run: |
CMAKE_RELEASE=3.20.1
wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_RELEASE}/cmake-${CMAKE_RELEASE}.tar.gz
tar xf cmake-${CMAKE_RELEASE}.tar.gz
cd cmake-${CMAKE_RELEASE}
./bootstrap
make -j$(nproc) && make install
cd .. && rm -rf cmake-${CMAKE_RELEASE}*

- name: Install awscli
run: |
wget "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -O "awscliv2.zip"
unzip awscliv2.zip
./aws/install
rm -rf aws awscliv2.zip

- uses: actions/checkout@v3

- run: mkdir "$GITHUB_WORKSPACE/out"

- name: Build and package release libraries
run: |
rm -rf build && mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DWITH_GFLAGS=0 -DWITH_SNAPPY=1 -DWITH_LZ4=1 -DWITH_ZLIB=1 -DWITH_ZSTD=1
mkdir -p "$GITHUB_WORKSPACE/out/root"
DESTDIR="$GITHUB_WORKSPACE/out/root" make -j$(nproc) install
( cd "$GITHUB_WORKSPACE/out/root" && tar czf ../speedb-${RELEASE_VERSION}.tar.gz . )
rm -rf "$GITHUB_WORKSPACE/out/root"
cd .. && rm -rf build

- name: Build release Jar
run: |
make clean
LIB_MODE=static DEBUG_LEVEL=0 PORTABLE=1 JAVA_HOME=/usr/lib/jvm/java-openjdk make -j$(nproc) rocksdbjavastatic
cp "java/target/speedbjni-${RELEASE_VERSION}-linux64.jar" "$GITHUB_WORKSPACE/out"

- name: Build db_bench
run: |
yum install -y gflags-devel
rm -rf build && mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DWITH_GFLAGS=1 \
-DWITH_SNAPPY=1 -DWITH_LZ4=1 -DWITH_ZLIB=1 -DWITH_ZSTD=1 \
-DWITH_BENCHMARK_TOOLS=1 -DROCKSDB_BUILD_SHARED=1
make -j$(nproc) db_bench
tar czf "$GITHUB_WORKSPACE/out/db_bench-speedb-${RELEASE_VERSION}.tar.gz" db_bench
cd .. && rm -rf build

- name: Generate checksums
run: |
for f in $GITHUB_WORKSPACE/out/*; do
sha256sum "$f" > "$f.sha256"
done

- name: Get release date
run: |
echo "RELEASE_DATE=$(git for-each-ref "--format=%(creatordate:short)" "refs/tags/${GITHUB_REF_NAME}")" >> $GITHUB_ENV

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: false
name: Speedb ${{ env.RELEASE_VERSION }} (${{ env.RELEASE_DATE }})
files: |
out/db_bench-speedb-${{ env.RELEASE_VERSION }}.tar.gz
out/db_bench-speedb-${{ env.RELEASE_VERSION }}.tar.gz.sha256
out/speedb-${{ env.RELEASE_VERSION }}.tar.gz
out/speedb-${{ env.RELEASE_VERSION }}.tar.gz.sha256
out/speedbjni-${{ env.RELEASE_VERSION }}-linux64.jar
out/speedbjni-${{ env.RELEASE_VERSION }}-linux64.jar.sha256

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2

- name: Upload artifacts to S3
run: |
aws s3 cp "$GITHUB_WORKSPACE/out" "s3://spdb-github-artifacts/release-${RELEASE_VERSION}" --recursive
rm -rf "$GITHUB_WORKSPACE/out"
110 changes: 110 additions & 0 deletions .github/workflows/ci_pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: CI

on:
#push:
workflow_dispatch:
workflow_call:
pull_request_review:
types: [submitted]


permissions: write-all

jobs:
#Sanity:
#uses: speedb-io/speedb/.github/workflows/sanity_check.yml@main

Build:
#needs: [Sanity]
if: ${{ github.event.review.state == 'approved' || github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/heads/release') }}
runs-on: [self-hosted, ubuntu, asrunner]
strategy:
matrix:
include:
- name: verify build
command: cmake .. -GNinja
- name: optimized build
command: cmake .. -DCMAKE_BUILD_TYPE=Release -GNinja
- mame: clang build
command: CC=clang CXX=clang++ cmake .. -GNinja
container:
image: alpine:3.14

steps:
- name: Pre-build
run: |
env
rm -rf /usr/share/dotnet || echo ""
df -h
apk add git
echo "nameserver 8.8.8.8" > /etc/resolv.conf
apk add bash python3 py3-pip clang clang-extra-tools shellcheck gcc g++ cmake ninja ccache \
openjdk10 gflags-dev snappy-dev lz4-dev bzip2-dev zstd-dev zlib-dev linux-headers openssh-client tar
python3 -m pip install lint-diffs flake8


- name: Checkout
uses: actions/checkout@v3


- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")


- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{runner.os}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: |
${{runner.os}}-ccache-


- name: ${{ matrix.name }}
run: |
if [ -d "$GITHUB_WORKSPACE/build" ]; then
echo >&2 "error: the build directory should not exist" && false NIK
fi
if [ -d "~/.ccache" ]; then
echo "Already exists"
else
mkdir -p ~/.ccache
ls ~ | grep cache || echo ""
touch ~/.ccache/ccache.txt
echo "aaa" > ~/.ccache/ccache.txt
ls ~/.ccache
cat ~/.ccache/ccache.txt
fi
mkdir -p "$GITHUB_WORKSPACE/build"
cd "$GITHUB_WORKSPACE/build"
export "CCACHE_BASEDIR=$HOME"
export "CCACHE_DIR=$HOME/.ccache"
export "CCACHE_COMPILERCHECK=content"
${{ matrix.command }} -DPORTABLE=1 -DWITH_GFLAGS=1 \
-DWITH_ZLIB=1 -DWITH_SNAPPY=1 -DWITH_BZ2=1 -DWITH_LZ4=1 -DWITH_ZSTD=1 \
-DWITH_JNI=1 -DJAVA_HOME=/usr/lib/jvm/default-jvm \
-DWITH_BENCHMARK_TOOLS=1 -DWITH_CORE_TOOLS=1 -DWITH_TOOLS=1 \
-DWITH_TESTS=1 -DWITH_ALL_TESTS=1 -DWITH_EXAMPLES=1
ninja

#Performance:
#if: ${{ github.event.review.state == 'approved' || github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/heads/release') }}
#needs: [Build]
#uses: speedb-io/speedb/.github/workflows/perf-test.yml@main

QA-Tests:
if: ${{ github.event.review.state == 'approved' || github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/heads/release') }}
needs: [Build]
uses: speedb-io/speedb/.github/workflows/qa-tests.yml@main

Fuzz:
if: ${{ github.event.review.state == 'approved' || github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/heads/release') }}
needs: [Build]
uses: ./.github/workflows/test_fuzz.yml
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
106 changes: 106 additions & 0 deletions .github/workflows/new_release_line.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: New Release Line

on:
workflow_dispatch:
inputs:
new_branch_major:
description: "Next release Major version (LEAVE EMPTY FOR AUTO-INCREMENT)"
required: false
new_branch_minor:
description: "Next release Minor version (LEAVE EMPTY FOR AUTO-INCREMENT)"
required: false
branches:
- main
- 'release/*'

permissions:
contents: read

jobs:
tag_version:
runs-on: [self-hosted, ubuntu, asrunner]
container:
image: alpine:3.14

env:
VERSION_FILE: speedb/version.h

steps:
- name: pre
run: |
echo "nameserver 8.8.8.8" > /etc/resolv.conf
apk add git openssh-client

- name: Verify chosen version
run: |
if ! echo "${{ inputs.new_branch_major }}" | grep -q "^[0-9]*$"; then
echo >&2 "error: major version must be a positive number" && false
fi
if ! echo "${{ inputs.new_branch_minor }}" | grep -q "^[0-9]*$"; then
echo >&2 "error: minor version must be a positive number" && false
fi

if [ "${{ inputs.new_branch_major }}${{ inputs.new_branch_minor }}" != "" ] && [ "$GITHUB_REF" != "refs/heads/main" ]; then
echo >&2 "error: cannot cut a major or a minor release from a branch that isn't main" && false
elif [ "$GITHUB_REF" != "refs/heads/main" ] && ! echo "$GITHUB_REF" | grep -q "^refs/heads/release/"; then
echo "error: cannot cut a patch release from a non-release branch" && false
fi

- uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.RELEASE_SSH_KEY }}

- name: Calculate new version
run: |
major=$(grep '_MAJOR\s\+[0-9]\+' "$VERSION_FILE" | sed 's/[^0-9]\+//')
minor=$(grep '_MINOR\s\+[0-9]\+' "$VERSION_FILE" | sed 's/[^0-9]\+//')

if [ -n "${{ inputs.new_branch_major }}" ] && [ "${{ inputs.new_branch_major }}" -lt "$major" ]; then
echo >&2 "error: the chosen major version is lower than current one" && false
elif [ -n "${{ inputs.new_branch_major }}" ] && [ "${{ inputs.new_branch_major }}" -gt "$major" ]; then
major=${{ inputs.new_branch_major }}
if [ -n "${{ inputs.new_branch_minor }}" ] && [ "${{ inputs.new_branch_minor }}" -ne 0 ]; then
echo >&2 "error: cannot bump minor version when bumping major version" && false
fi
minor=0
patch=0
elif [ -n "${{ inputs.new_branch_minor }}" ] && [ "${{ inputs.new_branch_minor }}" -lt "$minor" ]; then
echo >&2 "error: the chosen minor version is lower than current one" && false
elif [ -n "${{ inputs.new_branch_minor }}" ] && [ "${{ inputs.new_branch_minor }}" -gt "$minor" ]; then
minor=${{ inputs.new_branch_minor }}
patch=0
elif [ "$GITHUB_REF" = "refs/heads/main" ]; then
minor=$(( $minor + 1 ))
patch=0
else
patch=$(( $(grep '_PATCH\s\+[0-9]\+' "$VERSION_FILE" | sed 's/[^0-9]\+//') + 1 ))
fi

echo "major=$major" >> $GITHUB_ENV
echo "minor=$minor" >> $GITHUB_ENV
echo "patch=$patch" >> $GITHUB_ENV

- name: Update version.h
run: |
git config user.name "GitHub Runner Bot"
git config user.email "<>"

sed -i -e "s/\(#define [^\s]\+_MAJOR\s\+\)[0-9]\+/\1${major}/" "$VERSION_FILE"
sed -i -e "s/\(#define [^\s]\+_MINOR\s\+\)[0-9]\+/\1${minor}/" "$VERSION_FILE"
sed -i -e "s/\(#define [^\s]\+_PATCH\s\+\)[0-9]\+/\1${patch}/" "$VERSION_FILE"

git add "$VERSION_FILE"
git commit -m "release: publish version ${major}.${minor}.${patch}"
git push origin ${GITHUB_REF#refs/heads/}

- name: Tag and release
run: |
# Create a branch if it's a major or a minor release
if [ "$patch" -eq 0 ]; then
git checkout -b "release/${major}.${minor}"
git push -u origin "release/${major}.${minor}"
fi

# Create a tag for the release
git tag "speedb/v${major}.${minor}.${patch}"
git push origin "speedb/v${major}.${minor}.${patch}"
Loading