Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
136 changes: 136 additions & 0 deletions .github/workflows/wom-tree-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
name: Write-Optimized Merge (WOM) Tree CI

# Triggered on every push/PR that touches WomTree sources, tests, or this
# workflow. Targets v1.8.0.
on:
push:
branches:
- main
- develop
paths:
- 'include/storage/wom_tree.h'
- 'src/storage/wom_tree.cpp'
- 'tests/test_wom_tree.cpp'
- 'tests/CMakeLists.txt'
- 'cmake/CMakeLists.txt'
- '.github/workflows/wom-tree-ci.yml'
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'include/storage/wom_tree.h'
- 'src/storage/wom_tree.cpp'
- 'tests/test_wom_tree.cpp'
- 'tests/CMakeLists.txt'
- 'cmake/CMakeLists.txt'
- '.github/workflows/wom-tree-ci.yml'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ci-scope-classifier:
permissions:
contents: read
uses: ./.github/workflows/ci-scope-classifier.yml

# ---------------------------------------------------------------------------
# Build and run the WomTree focused test suite.
# Tests cover all acceptance criteria:
# AC-1 Lower write amplification (2-5x vs 10-30x for LSM) – verified
# writeAmplification() < 30.0 after 500 inserts with forced flushes.
# AC-2 Better for update-heavy workloads – overwrite 100 keys, read latest.
# AC-3 Reduced compaction overhead – flush_passes == 0 with large buffer;
# compact() flushes lazily buffered ops without data loss.
# AC-4 Higher space amplification – user_bytes_written / internal stats
# exposed and non-zero.
# AC-5 Slower point reads (multi-level traversal) – tree_height > 1 for
# 64 entries with leaf_capacity=4; reads still return correct values.
# ---------------------------------------------------------------------------
wom-tree-unit-tests:
needs: ci-scope-classifier
if: needs.ci-scope-classifier.outputs.has_code_changes == 'true'
name: WOM Tree tests (${{ matrix.os }} / ${{ matrix.compiler }})
runs-on: ${{ matrix.os }}
permissions:
contents: read

strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
compiler: gcc-12
cc: gcc-12
cxx: g++-12
- os: ubuntu-22.04
compiler: clang-15
cc: clang-15
cxx: clang++-15
- os: ubuntu-24.04
compiler: gcc-13
cc: gcc-13
cxx: g++-13

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up C++ build environment
uses: ./.github/actions/setup-cpp-build
with:
cc: ${{ matrix.cc }}
cxx: ${{ matrix.cxx }}
extra-packages: nlohmann-json3-dev libssl-dev libzstd-dev

- name: Configure (WOM Tree focused test target)
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
run: |
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER=${{ matrix.cc }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DTHEMIS_ENABLE_LLM=OFF \
-DTHEMIS_ENABLE_GPU=OFF

- name: Build focused test binary
run: cmake --build build --target test_wom_tree_focused -- -j$(nproc)

- name: Run WOM Tree unit tests
run: |
cd build
ctest --test-dir . \
--tests-regex WomTreeFocusedTests \
--output-on-failure \
--timeout 60 \
2>&1 | tee wom_tree_test_output.txt

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: wom-tree-results-${{ matrix.os }}-${{ matrix.compiler }}
path: |
build/wom_tree_test_output.txt
retention-days: 14

- name: Write job summary
if: always()
run: |
echo "## 🌲 Write-Optimized Merge (WOM) Tree – Unit Tests" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "| Parameter | Value |" >> "$GITHUB_STEP_SUMMARY"
echo "|-----------|-------|" >> "$GITHUB_STEP_SUMMARY"
echo "| **OS** | \`${{ matrix.os }}\` |" >> "$GITHUB_STEP_SUMMARY"
echo "| **Compiler** | \`${{ matrix.compiler }}\` |" >> "$GITHUB_STEP_SUMMARY"
echo "| **Event** | \`${{ github.event_name }}\` |" >> "$GITHUB_STEP_SUMMARY"
echo "| **Branch** | \`${{ github.ref_name }}\` |" >> "$GITHUB_STEP_SUMMARY"
echo "| **Commit** | \`${{ github.sha }}\` |" >> "$GITHUB_STEP_SUMMARY"
echo "| **Triggered by** | ${{ github.actor }} |" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "WomTree: Bε-tree write-optimized storage alternative to LSM. Write amplification 2-5× vs 10-30× for LSM. Lazy buffer propagation with reduced compaction overhead." >> "$GITHUB_STEP_SUMMARY"
1 change: 1 addition & 0 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1441,6 +1441,7 @@ set(THEMIS_CORE_SOURCES
../src/storage/transaction_retry_manager.cpp
../src/storage/compaction_manager.cpp
../src/storage/merge_operators.cpp
../src/storage/wom_tree.cpp
../src/storage/compressed_storage.cpp
../src/storage/compression_strategy.cpp
../src/storage/gpu_compression.cpp
Expand Down
Loading
Loading