Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
b14fee7
chore: Lower the system version for compatibility (#64)
syslucas Aug 6, 2025
242222e
submodule rockside: RunManualFlushAll: remove redundant useless code
rockeet Aug 8, 2025
31004b9
c api: check _GLIBCXX_USE_CXX11_ABI for rocksdb_pinnableslice_t
rockeet Aug 9, 2025
d34aeaf
ReadOptions::BooleanDontCopyTrue(&&) minor bugfix
rockeet Aug 10, 2025
7b5c662
java: jmh: change project.build.source 1.7 to 1.8
rockeet Aug 10, 2025
a301c63
SideGetBenchmarks.java: Add bench aZeroCopyGet
rockeet Aug 10, 2025
ec55229
java: optimize compile speed
rockeet Aug 11, 2025
8af6e2c
java/Makefile: delete useless action
rockeet Aug 12, 2025
41864f5
java: simplify and speed `make`
rockeet Aug 12, 2025
0eb2a24
java: pass JAVA_HOME between Makefile & autocheck
rockeet Aug 12, 2025
92f97ae
Makefile for java: fix for generate header with max parallel build
rockeet Aug 14, 2025
ccb8d44
update submodule rockside
rockeet Aug 16, 2025
d595abd
java: Add native SidePluginRepo.importJson(String)
rockeet Aug 16, 2025
cfc4203
java: Add SidePluginRepo.closeOneDB(db)
rockeet Aug 16, 2025
e14ea2d
EventHelpers::LogAndNotifyTableFileCreationFinished: log the reason
rockeet Aug 16, 2025
4fb3dd7
java: Add SidePluginRepo.createCFWithImport
rockeet Aug 16, 2025
a198bca
update submodule rockside
rockeet Aug 17, 2025
8f5ff93
java: Java_org_rocksdb_RocksDB_closeDatabase: add log
rockeet Aug 17, 2025
220c79b
java: SidePluginRepo.closeOneDB() multi close(db) is safe
rockeet Aug 17, 2025
a265476
Update submodule rockside
rockeet Aug 17, 2025
ce41363
Add SidePluginRepo.removeOneDB(db), without db.close()
rockeet Aug 17, 2025
6c9426a
java: Add RocksIterator.refreshForDatabaseGC()
rockeet Aug 17, 2025
b6bedbd
JAVA_ARGS += --add-opens java.base/jdk.internal.misc=ALL-UNNAMED
rockeet Aug 18, 2025
7807112
java: use ReadOptions::just_check_key_exists
rockeet Aug 19, 2025
1f74b47
ColumnFamilyOptions::Dump(): print memtable fac options
rockeet Aug 19, 2025
2674efc
Makefile: jtest MAKE_UNIT_TEST ?= 1
rockeet Aug 19, 2025
82bad01
Add KeyValuePopulator for zero copy write
rockeet Aug 19, 2025
b6f56ab
jtest.sh: remove useless lines
rockeet Aug 19, 2025
eab7161
java: RocksIterator: improve value0() for fetchValue()
rockeet Aug 19, 2025
3813748
Makefile: improve for java
rockeet Aug 19, 2025
cc204c4
update submdoule rockside
rockeet Aug 19, 2025
d67089a
java: improve key_may_exist_direct_helper
rockeet Aug 19, 2025
3a6d157
Move control macro JNI_USE_KEY_VALUE_POPULATOR to Makefile
rockeet Aug 21, 2025
42ec420
java: write_batch.cc: use KeyValuePopulator
rockeet Aug 21, 2025
9bb5949
rocksdbjni.cc: Missed `Merge` overload of JNIKeyValuePopulator changes
rockeet Aug 22, 2025
4d2a5fe
Build: allow user env JAVAC_ARGS & ENABLE_AUTO_CHECK_LD
rockeet Aug 22, 2025
6906f1c
Makefile: Add export USE_FOLLY_LITE="$(USE_FOLLY_LITE)";
rockeet Aug 22, 2025
92cf29c
perf_context_imp.h: for #if defined(NPERF_CONTEXT)
rockeet Aug 22, 2025
b6d9346
KeyValuePopulator: made non-copyable
rockeet Aug 22, 2025
53bff01
KeyValuePopulator: made non-copyable - fix indent
rockeet Aug 22, 2025
48d5fe6
Makefile: add topling core lib objects into librocksdbjni
rockeet Aug 23, 2025
4b42903
Makefile: fix for without libjemalloc
rockeet Aug 23, 2025
8557ff3
Fix TLS, static TLS is fast but less compatible
rockeet Aug 23, 2025
6b5e153
java: print message on load librocksdbjni failed
rockeet Aug 23, 2025
0c62aa1
Add missing `override`
rockeet Aug 25, 2025
b379711
Use boost::intrusive_ptr<ReadonlyFileMmap>
rockeet Aug 25, 2025
db57b5d
define TOPLINGDB_WITH_FIBER_AIO=0 on android
rockeet Aug 25, 2025
ba40ef8
Fix for android
rockeet Aug 25, 2025
60c9774
rocksjni.cc: ignored "-Wshift-negative-value"
rockeet Aug 25, 2025
3ca4449
Makefile: Fix for cross build for android
rockeet Aug 25, 2025
92b79cb
Update submodule rockside: for android
rockeet Aug 25, 2025
9d3f5bd
Add android-build.sh
rockeet Aug 25, 2025
4ca7bfe
Makefile: ${TOPLING_LIB_OBJ_LIST_FILE} depend on ${TOPLING_LIB_SRC_LI…
rockeet Aug 25, 2025
01f4178
Makefile: Add var STRIP_CMD ?= strip
rockeet Aug 25, 2025
d206b1f
android-build.sh: export STRIP_CMD=${CXX_HOME}/bin/llvm-strip
rockeet Aug 25, 2025
35295c2
android-build.sh: STRIP_DEBUG_INFO=1 & ROCKSDB_JAR_WITH_DYNAMIC_LIBS=1
rockeet Aug 25, 2025
c533dfd
Build script for android: bundle snappy,lz4,bz2
rockeet Aug 25, 2025
8509c6e
Makefile: Fix dependency bugs
rockeet Aug 26, 2025
b3a0114
c.h: mark ToplingDB api as weak symbol
rockeet Aug 27, 2025
fd02108
RocksIterator.key()/value(): Mark as final
rockeet Aug 27, 2025
9a33307
Makefile: timing build commands
rockeet Aug 28, 2025
b8d7ce3
Update pom and .github/workflows
rockeet Aug 29, 2025
8b7c642
Add .github/workflows/android-jni.yml
rockeet Aug 29, 2025
903021a
Makefile: CXXFLAGS += $(ARCHFLAG) just for osx
rockeet Aug 29, 2025
0e14f74
fs_cat.cc: fix clang bad warn move/std::move
rockeet Aug 30, 2025
0b3015a
update submodule rockside
rockeet Aug 30, 2025
285a826
Makefile: depend include all .d
rockeet Aug 30, 2025
b4cd676
Makefile: -flto=auto on link
rockeet Aug 30, 2025
cc8bd51
change ./github/workflow
rockeet Aug 30, 2025
4bef1e1
Add .github/workflows/topling-jni-release.yml
rockeet Aug 31, 2025
e6dd406
java: Add ColumnFamilyOptions.mergeOperatorName()
rockeet Sep 2, 2025
8ed1550
change groupId from com.github.topling to cn.topling
rockeet Sep 2, 2025
2b3f7ed
Options.java: Add missing merge operator members
rockeet Sep 3, 2025
54aa76b
Makefile: var DISABLE_JEMALLOC & ROCKSDB_DISABLE_JEMALLOC
rockeet Sep 4, 2025
c90180f
Makefile: export ROCKSDB_HOME = $(realpath .)
rockeet Sep 4, 2025
5f9774b
Makefile: librocksdb*: do not need libterark*
rockeet Sep 4, 2025
4fef9fb
topling-jni-release.yml: upload index.html style.css dcompact_worker
rockeet Sep 4, 2025
5ea21d4
Revert "Options.java: Add missing merge operator members"
rockeet Sep 4, 2025
2e30de8
Revert "java: Add ColumnFamilyOptions.mergeOperatorName()"
rockeet Sep 4, 2025
e6b1905
update submdoule rockside
rockeet Sep 4, 2025
f0b95b6
Makefile: Fix change $(AM_V_AR)rm to $(AM_V_at)rm
rockeet Sep 6, 2025
8500ef7
Makefile: LDFLAGS += ${TOPLING_CORE_LD_LIBS_EXTRA}
rockeet Sep 6, 2025
3885db3
Makefile: ROCKS_DEP_RULES:=$(filter-out watch-log, $(ROCKS_DEP_RULES))
rockeet Sep 6, 2025
0a1b1e8
Makefile: export ROCKSDBJNILIB & LD_PRELOAD in java make
rockeet Sep 6, 2025
ea131f2
Add Iterator::CountKeysInRange(beg, end, fixed_user_key_len=0)
rockeet Sep 6, 2025
dd56e00
java: Add RocksIterator::countKeysInRange() & unit test
rockeet Sep 6, 2025
ece4d10
rockisde Impl_OpenDB_tpl: params.name = dbname: skip check `!dbname.e…
rockeet Sep 7, 2025
05bef37
rockside: Add template class DcompactSerDeFunc<Object>
rockeet Sep 9, 2025
b14bb73
build_detect_platform: Fix for cygwin
rockeet Sep 18, 2025
6ffa516
update submodule rockside
rockeet Sep 19, 2025
2c17922
topling-jni-release.yml: bundle compression libs
rockeet Sep 25, 2025
1629f14
Fix build_detect_platform
rockeet Sep 25, 2025
2747584
Makefile: remove -lxxx on bundled compression lib xxx
rockeet Sep 25, 2025
ac00a9f
Makefile: remove redundant code, keep prefering bundled compression lib
rockeet Sep 25, 2025
cb616c2
Revert "Makefile: remove redundant code, keep prefering bundled compr…
rockeet Sep 25, 2025
3cc609a
Makefile: fix recursive var, use :=
rockeet Sep 25, 2025
5351bb2
Makefile: remove BUNDLED_COMPRESSION_LIBS
rockeet Sep 25, 2025
36d4ec9
workflow: replace libcurl4-gnutls-dev to libcurl4-openssl-dev
rockeet Sep 28, 2025
12049db
Fix clang warnings
rockeet Oct 2, 2025
202921c
submodule rockside: json.h: Remove spaces in `operator "" _json`
rockeet Oct 3, 2025
e7417c8
Use TOPLING_USE_BOUND_PMF and ExtractFuncPtr
rockeet Oct 7, 2025
91a8692
db_bench: Add option wkey_file and rkey_file
rockeet Oct 7, 2025
311334f
io_posix.cc: Fix clang warning -Wshorten-64-to-32
rockeet Oct 10, 2025
95dd4d0
java/Makefile: bugfix checking TOPLING_USE_DYNAMIC_TLS
rockeet Oct 11, 2025
96a5a16
Makefile: remove setting LD_LIBRARY_PATH & quiet make clean
rockeet Oct 11, 2025
b2da695
Fix for centos7: std::string _GLIBCXX_USE_CXX11_ABI == 0
rockeet Oct 12, 2025
51dd519
_mm_maskz_loadu_epi8: use _bzhi_u32(-1, len) to generate mask
rockeet Oct 16, 2025
6b9defc
TableCache::Get: use bound pmf for skip check row_cache
rockeet Oct 16, 2025
037c737
version_edit.h: HostPrefixCache fix clang -Wshorten-64-to-32
rockeet Oct 16, 2025
82df62b
db_iter.cc: SetFindNext: FixLen: optimize for avx512
rockeet Oct 16, 2025
78776e1
Makefile: remove -fno-builtin-memcmp
rockeet Oct 16, 2025
41cf422
DBImpl::GetImpl() better inline
rockeet Oct 17, 2025
9a5f69f
Version::Get() early static dispatch & templatize FilePicker
rockeet Oct 17, 2025
823b4e5
GetContext: TOPLINGDB_WITH_TIMESTAMP for ukey_with_ts_found_
rockeet Oct 17, 2025
1b5408e
db_iter.cc: RevBytewiseCmpNoTS reuse call BytewiseCmpNoTS
rockeet Oct 18, 2025
d7b9d41
db_iter.cc: BytewiseCmpNoTS improve avx512
rockeet Oct 18, 2025
9802736
db_iter.cc: BytewiseCmpNoTS::operator() Add Const 4,8,12,16 overload
rockeet Oct 18, 2025
87ae51e
db_iter.cc: SetFuncPtr() FixLen 8,12,16 on avx512
rockeet Oct 18, 2025
803395a
db_iter.cc: saved_key_.SetUserKey<FixLen> for flame graph
rockeet Oct 18, 2025
d5afd8a
dbformat.h: Add TOPLINGDB_USE_MANUAL_MEMCMP
rockeet Oct 18, 2025
495c4b3
TableCache: always inline GetNoneRowCache
rockeet Oct 18, 2025
4326784
db_impl.cc: flatten DBImpl::Get
rockeet Oct 18, 2025
57df7f0
ROCKSDB_ASSUME(cond) = [[assume(cond)]] for gcc13+
rockeet Oct 18, 2025
f8e3249
db_bench_tool.cc: readseq & nextwithkey: wrap on end of iter
rockeet Oct 18, 2025
142b94b
db_bench_tool.cc: Fix ScanNextWithKey: fixed_user_key_len
rockeet Oct 19, 2025
5e79515
CMakeLists.txt: Fix PORTABLE MATCHES Regex
rockeet Oct 18, 2025
819d437
MemoryEqual & SliceEqual: add avx512 & move from slice.h to dbformat.h
rockeet Oct 18, 2025
01b32da
DBIter::SetUserKey to SetUK: Fix for avx512 FixLen==64
rockeet Oct 18, 2025
2f98624
DBIter::Next/NextWithKey() Safe improve: remove ClearSavedValue()
rockeet Oct 19, 2025
48e6be8
DBIter::ResetValueAndColumns() Safe improve: value_.clear() -> .size_…
rockeet Oct 19, 2025
3d0c0dd
DBIter::Next/NextWithKey() Aggressive improve: remove ResetValueAndCo…
rockeet Oct 19, 2025
934f24e
DBIter::FastIterKey::SetUK: use key.assign() on var keylen
rockeet Oct 19, 2025
97032c9
DBIter::NextWithKey() improve by manual inline this.key()
rockeet Oct 19, 2025
a34c986
DBIter::SetFuncPtr() destroy saved_key_
rockeet Oct 20, 2025
bb0314c
DBIter::Next() Add missed likely
rockeet Oct 25, 2025
2d8289b
DBIter::SetFuncPtr() tidy align macro SetFindNext3 body
rockeet Oct 25, 2025
036f3bb
DBIter::Next() & NextWithKey() remove ResetBlobValue() on FixLen opti…
rockeet Oct 25, 2025
5556b17
Add RetryNextAndGetResult for LevelIterator: direct call file_iter
rockeet Oct 25, 2025
935c62d
DBIter::Next/NextWithKey() move `ok = iter_.Next();` to block end
rockeet Oct 25, 2025
1663b22
DBIter: FindNextUserEntry add template arg bool CheckMaxSkip
rockeet Oct 26, 2025
2250194
DBIter: optimize normal case prefix_same_as_start_ == false
rockeet Oct 26, 2025
5b3d775
DBIter::FindNextUserEntryInternalTmpl: Add an unlikely
rockeet Oct 26, 2025
ab39db1
DBIter::Next/NextWithKey() Move ReleaseTempPinnedData to MergeValuesN…
rockeet Oct 27, 2025
9b1c3ba
DBIter::Next/NextWithKey() check FindNextUserEntry retval instead of …
rockeet Oct 27, 2025
8a6f9bd
DBIter::FastIterKey::SetUK() workaround g++11 if constexpr bug
rockeet Oct 27, 2025
01f228a
db_bench_tool.cc: %11.6f micros/op for subnano precision
rockeet Oct 27, 2025
21cd609
Makefile: LDFLAGS += -latomic
rockeet Oct 27, 2025
9dc75f1
.github/workflow: Add unit test and db_bench
rockeet Oct 27, 2025
fa81bd1
merging_iterator.cc: LoadPrefixZeroSuffix() specialize for PrefixLen …
rockeet Oct 27, 2025
a609d30
db_bench.sh: some changes
rockeet Oct 27, 2025
2e47b3f
merging_iterator.cc: HeapItemAndPrefix: put iter_type before item_ptr
rockeet Oct 28, 2025
7982f0a
merging_iterator.cc: key_prefix be byte[23] on avx512
rockeet Oct 28, 2025
3e4c9d5
merging_iterator.cc: impl MERGE_ITER_CMP_PREFIX on non-avx512
rockeet Oct 28, 2025
90aee26
avx512 optimize: use blsi instead of tzcnt for less compare
rockeet Oct 29, 2025
4240fbd
avx512 optimize: use -neq instead of blsi(neq)
rockeet Oct 29, 2025
f0a0624
DBIter: CmpNoTS::equal() add template arg FixLen
rockeet Oct 29, 2025
581e74e
DBIter: remove unused code
rockeet Oct 29, 2025
5241049
DBIter::SetFuncPtr() reduce template instant for VirtualCmpNoTS
rockeet Oct 29, 2025
f422587
DBIter: Add FastIterKey::GetUK<FixLen>
rockeet Oct 30, 2025
592d3fe
DBIter::FindNextUserEntryInternalTmpl() Add likely/unlikely
rockeet Oct 30, 2025
ceee512
DBIter::FastIterKey::key sso max should be 80 for avx512
rockeet Oct 30, 2025
b041125
DBIter::FastIterKey::key sso max should better be 128 for avx512
rockeet Oct 30, 2025
15a22ce
LevelIterator::UpdateScanFunc() set prepare_and_get_value_
rockeet Oct 30, 2025
03aeb5a
DBIter::value() form an invalid value on lazy load failed
rockeet Oct 30, 2025
109cac2
MemTableListVersion::UnrefMemTable() tolerate CSPPMemTable Approximat…
rockeet Oct 31, 2025
ea8be0d
LevelIterator::Prev() reset scan func
rockeet Oct 31, 2025
64e9e35
IteratorWrapper: Add value_iter_ for PrepareAndGetValue
rockeet Oct 31, 2025
35e332c
MergingIterator::DoNext() & heap update_top() optimize
rockeet Oct 31, 2025
3907e60
MergingIterator::PrepareScan() override optimize forward scan value f…
rockeet Oct 31, 2025
4bac285
Add Iterator::GetUnwrapped() to remove ArenaWrappedDBIter overhead
rockeet Oct 31, 2025
38b5c51
DBIter::FindNextUserEntryInternalTmpl() fix missing change SetUK<FixL…
rockeet Oct 31, 2025
06049f0
db_bench_tool.cc: readseq and nextwidthkey fix for empty DB
rockeet Oct 31, 2025
78de0ce
DBIter::value() set status on fail for user checking
rockeet Nov 1, 2025
ecb1576
Remove Iterator::PrepareValue(), use iter->value().size() == size_t(-…
rockeet Nov 1, 2025
2deb0a0
jni: iterator: check value lazy load failure
rockeet Nov 1, 2025
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
104 changes: 104 additions & 0 deletions .github/workflows/android-jni.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: "build android-jni"

on:
workflow_dispatch:
inputs:
version_suffix:
required: false
default: '-SNAPSHOT'
use_lto:
required: false
description: Link Use LTO
default: '1'
verbose_build_output:
required: false
description: run make with V=...
default: '0'
publish:
required: false
type: boolean
description: publish to github
default: true

env:
NDK_VERSION: 26.1.10909125
ANDROID_ABI: arm64-v8a
ANDROID_PLATFORM: android-34
ANDROID_NDK_ROOT: ${{github.workspace}}/android-ndk

jobs:
build:
runs-on: ubuntu-24.04
env:
GITHUB_TOKEN: ${{github.token}}
permissions:
contents: read
packages: write

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{github.workspace}} # location for the settings.xml file

- name: Setup Android SDK
uses: android-actions/setup-android@v3

- name: Display NDK information
run: |
set -xe
env | egrep 'ANDROID|NDK'
#find /usr/local/lib/android/sdk -type d
$ANDROID_NDK_HOME/ndk-build --version

- name: Init submodule & Setup ssh
run: |
git submodule update --init --recursive
mkdir -p ~/.ssh && mkdir -p /opt/lib
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
echo nproc = `nproc`

- name: Git clone SidePlugin(s)
run: |
export ROCKSDB_DISABLE_GFLAGS=1
make clean # this triggers auto git clone

- name: Compile RocksDB Java Release
run: |
set -xe
echo $JAVA_HOME
export V=${{inputs.verbose_build_output}}
export USE_LTO=${{inputs.use_lto}}
bash -x android-build.sh

- name: Generate java/pom.xml from template
run: |
set -xe
ROCKSDB_VERSION=`build_tools/version.sh full`
ROCKSDB_JAVA_VERSION=${ROCKSDB_VERSION}${{inputs.version_suffix}}
cd java
# F\?ROCKSDB_JAVA_VERSION for both flink and normal rocksdbjni
sed -e 's/\${F\?ROCKSDB_JAVA_VERSION}/'"${ROCKSDB_JAVA_VERSION}/" \
-e 's/\(.*<artifactId>\)\(f\?rocksdbjni\)\(<\/artifactId>.*\)/\1\2-'"$ANDROID_PLATFORM"'\3/' \
pom.xml.template > pom.xml

- name: Publish rocksjni-android jar to GitHub Packages
run: |
ROCKSDB_VERSION=`build_tools/version.sh full`
ROCKSDB_JAVA_VERSION=${ROCKSDB_VERSION}${{inputs.version_suffix}}
set -xe
cd java/target
mvn deploy:deploy-file -e -s $GITHUB_WORKSPACE/settings.xml \
-DpomFile=../pom.xml \
-Durl=https://maven.pkg.github.com/$GITHUB_REPOSITORY -DrepositoryId=github \
-Dfile=rocksdbjni-${ROCKSDB_VERSION}-linux64.jar \
-Dversion=${ROCKSDB_JAVA_VERSION}
93 changes: 93 additions & 0 deletions .github/workflows/db_bench-avx512.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# TODO: How to cache make files / speed up build progress here?
name: "db_bench-avx512"

on:
workflow_dispatch:
inputs:
use_clang:
type: boolean
required: false
default: false
description: use clang

jobs:
build:
# refer https://github.com/actions/runner-images to get the details
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{github.token}}
permissions:
contents: read
packages: write

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Install Prerequisites
run: |
set -xe
sudo apt-get update -y && sudo apt-get install -y \
libjemalloc-dev libaio-dev libgflags-dev zlib1g-dev \
libbz2-dev libcurl4-openssl-dev liburing-dev \
libsnappy-dev libbz2-dev liblz4-dev libzstd-dev

- name: Init submodule & Setup ssh
run: |
git submodule update --init --recursive
mkdir -p ~/.ssh && mkdir -p /opt/lib
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
echo nproc = `nproc`

- name: Git clone SidePlugin(s)
run: |
# this will be auto triggerred in normal build, we defined
# it here is just for seperate steps more clearly.
# there is no dedicated target for this purpose, so we use `clean`
# as the target, it need not any `clean` at this point.
# `clean` is just used for triggers auto git clone
make clean

- name: Compile db_bench
run: |
set -xe
if ${{inputs.use_clang}}; then
export CXX=clang++
export CC=clang
fi
export CPU=-march=skylake-avx512
make db_bench memtablerep_bench -j`nproc` DEBUG_LEVEL=0 UPDATE_REPO=0

- name: Run db_bench
run: |
set -xe
make db_bench -j`nproc` DEBUG_LEVEL=0 UPDATE_REPO=0
export TOPLINGDB_GetContext_sampling=kNone
export ROCKSDB_KICK_OUT_OPTIONS_FILE=1
args=(
-json sideplugin/rockside/sample-conf/db_bench_enterprise.yaml
-num=50000000
-key_size=8
-value_size=10
-batch_size=1000
-benchmarks=fillseq,compact,nextwithkey,nextwithkey,nextwithkey,readseq,readseq,readseq,readrandom,readrandom,readrandom
-scan_omit_key -scan_omit_value # ToplingDB specific
-enable_zero_copy # ToplingDB specific, for point search by Get/MultiGet
-progress_reports=false
)
./db_bench ${args[@]}

- name: Run memtablerep_bench
run: |
args=(
-benchmarks=fillrandom,readrandom,readwrite
-item_size=0
-num_operations=100000000
-write_buffer_size=536870912
)
set -xe
./memtablerep_bench ${args[@]} -memtablerep=skiplist
echo
./memtablerep_bench ${args[@]} -memtablerep='cspp:{"mem_cap":"16G","use_hugepage":false}'
92 changes: 92 additions & 0 deletions .github/workflows/db_bench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# TODO: How to cache make files / speed up build progress here?
name: "db_bench"

on:
workflow_dispatch:
inputs:
use_clang:
type: boolean
required: false
default: false
description: use clang

jobs:
build:
# refer https://github.com/actions/runner-images to get the details
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{github.token}}
permissions:
contents: read
packages: write

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Install Prerequisites
run: |
set -xe
sudo apt-get update -y && sudo apt-get install -y \
libjemalloc-dev libaio-dev libgflags-dev zlib1g-dev \
libbz2-dev libcurl4-openssl-dev liburing-dev \
libsnappy-dev libbz2-dev liblz4-dev libzstd-dev

- name: Init submodule & Setup ssh
run: |
git submodule update --init --recursive
mkdir -p ~/.ssh && mkdir -p /opt/lib
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
echo nproc = `nproc`

- name: Git clone SidePlugin(s)
run: |
# this will be auto triggerred in normal build, we defined
# it here is just for seperate steps more clearly.
# there is no dedicated target for this purpose, so we use `clean`
# as the target, it need not any `clean` at this point.
# `clean` is just used for triggers auto git clone
make clean

- name: Compile db_bench
run: |
set -xe
if ${{inputs.use_clang}}; then
export CXX=clang++
export CC=clang
fi
make db_bench memtablerep_bench -j`nproc` DEBUG_LEVEL=0 UPDATE_REPO=0

- name: Run db_bench
run: |
set -xe
make db_bench -j`nproc` DEBUG_LEVEL=0 UPDATE_REPO=0
export TOPLINGDB_GetContext_sampling=kNone
export ROCKSDB_KICK_OUT_OPTIONS_FILE=1
args=(
-json sideplugin/rockside/sample-conf/db_bench_enterprise.yaml
-num=50000000
-key_size=8
-value_size=10
-batch_size=1000
-benchmarks=fillseq,compact,nextwithkey,nextwithkey,nextwithkey,readseq,readseq,readseq,readrandom,readrandom,readrandom
-scan_omit_key -scan_omit_value # ToplingDB specific
-enable_zero_copy # ToplingDB specific, for point search by Get/MultiGet
-progress_reports=false
)
./db_bench ${args[@]}

- name: Run memtablerep_bench
run: |
args=(
-benchmarks=fillrandom,readrandom,readwrite
-item_size=0
-num_operations=100000000
-write_buffer_size=536870912
)
set -xe
./memtablerep_bench ${args[@]} -memtablerep=skiplist
echo
./memtablerep_bench ${args[@]} -memtablerep='cspp:{"mem_cap":"16G","use_hugepage":false}'
106 changes: 106 additions & 0 deletions .github/workflows/topling-jni-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Publish to Release

on:
release:
types: [created]

jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: maven
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Install Prerequisites
run: |
set -xe
cat $GITHUB_WORKSPACE/settings.xml
sudo apt-get update -y && sudo apt-get install -y \
libaio-dev zlib1g-dev libcurl4-openssl-dev liburing-dev

- name: Init submodule & Setup ssh
run: |
git submodule update --init --recursive
mkdir -p ~/.ssh && mkdir -p /opt/lib
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
echo nproc = `nproc`

- name: Git clone SidePlugin(s)
run: |
# this will be auto triggerred in normal build, we defined
# it here is just for seperate steps more clearly.
# there is no dedicated target for this purpose, so we use `clean`
# as the target, it need not any `clean` at this point.
# `clean` is just used for triggers auto git clone
env USE_LTO=1 \
ROCKSDB_DISABLE_GFLAGS=1 \
make clean

- name: make bundled compression libs
run: |
env USE_LTO=1 \
ROCKSDB_DISABLE_GFLAGS=1 \
make UPDATE_REPO=0 DEBUG_LEVEL=0 DISABLE_JEMALLOC=1 TOPLING_USE_DYNAMIC_TLS=1 -j60 libsnappy.a liblz4.a libbz2.a

- name: make depend for Compile RocksDBJava Release
run: |
echo JAVA_HOME = $JAVA_HOME
set -xe
env USE_LTO=1 \
ROCKSDB_DISABLE_GFLAGS=1 \
make depend java/include/java_header_list.mk \
-j`nproc` DEBUG_LEVEL=0 UPDATE_REPO=0 \
DISABLE_JEMALLOC=1 TOPLING_USE_DYNAMIC_TLS=1 \
STRIP_DEBUG_INFO=1 ROCKSDB_JAR_WITH_DYNAMIC_LIBS=1

- name: Compile RocksDBJava Release
run: |
echo JAVA_HOME = $JAVA_HOME
set -xe
env USE_LTO=1 \
ROCKSDB_DISABLE_GFLAGS=1 \
make rocksdbjava install-dcompact -j`nproc` \
DEBUG_LEVEL=0 UPDATE_REPO=0 PREFIX=install-here \
DISABLE_JEMALLOC=1 TOPLING_USE_DYNAMIC_TLS=1 \
STRIP_DEBUG_INFO=1 ROCKSDB_JAR_WITH_DYNAMIC_LIBS=1

- name: Strip and Change dcompact_worker
run: |
MAJOR_DOT_MINOR=`build_tools/version.sh major`.`build_tools/version.sh minor`
exebin=install-here/bin/dcompact_worker.exe
strip ${exebin}
patchelf --replace-needed librocksdb.so.${MAJOR_DOT_MINOR} librocksdbjni-linux64.so ${exebin}
gzip ${exebin}
mv ${exebin}.gz java/target/dcompact_worker.gz

- name: Prerelease and Generate Checksums
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
set -xe
ROCKSDB_VERSION=`build_tools/version.sh full`
# ex: topling-8.10.2-frocksdb-1.0, part <frocksdb> will be ignored
TOPLING_VERSION=`echo ${GITHUB_REF} | sed 's:^refs/tags/topling-'${ROCKSDB_VERSION}'[-_a-z]*\([.0-9]\):\1:'`
ROCKSDB_JAVA_VERSION=${ROCKSDB_VERSION}-topling-${TOPLING_VERSION}
cd java/target
db_artifactId=`sed -n 's/.*<artifactId>\(f\?rocksdbjni\)<\/artifactId>.*/\1/p' ../pom.xml.template`
TARGET_JAR=${db_artifactId}-${ROCKSDB_JAVA_VERSION}.jar
mv rocksdbjni-${ROCKSDB_VERSION}-linux64.jar ${TARGET_JAR}
shasum -a 1 ${TARGET_JAR} > ${TARGET_JAR}.sha1
md5sum ${TARGET_JAR} > ${TARGET_JAR}.md5
gh release upload --clobber ${{github.ref_name}} ${TARGET_JAR}* index.html style.css dcompact_worker.gz
Loading