Skip to content

Commit ec2ab25

Browse files
authored
Merge pull request #23 from marvin-j97/data-partitions
[WIP] 0.3.0: New architecture
2 parents 525d14c + b0a60ad commit ec2ab25

File tree

145 files changed

+8959
-4534
lines changed

Some content is hidden

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

145 files changed

+8959
-4534
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/test_fjall.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Tests
2+
3+
on:
4+
# TODO: remove
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- "**"
11+
12+
env:
13+
CARGO_TERM_COLOR: always
14+
15+
jobs:
16+
test:
17+
cancel-timeout-minutes: 20
18+
strategy:
19+
matrix:
20+
rust_version:
21+
- stable
22+
- "1.74.0" # MSRV
23+
os:
24+
- ubuntu-latest
25+
- windows-latest
26+
- macos-latest
27+
runs-on: ${{ matrix.os }}
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
- uses: dtolnay/rust-toolchain@stable
32+
with:
33+
toolchain: ${{ matrix.rust_version }}
34+
- name: Add rustfmt
35+
run: rustup component add rustfmt
36+
- name: Add clippy
37+
run: rustup component add clippy
38+
- name: Set up cargo cache
39+
uses: Swatinem/rust-cache@v2
40+
with:
41+
prefix-key: ${{ runner.os }}-cargo
42+
workspaces: >
43+
fjall -> target
44+
fjall/examples/actix-kv -> target
45+
fjall/examples/actix-triplestore -> target
46+
fjall/examples/structured -> target
47+
- name: Build
48+
run: cargo build -v
49+
working-directory: fjall
50+
- name: Format
51+
run: cargo fmt --all -- --check
52+
working-directory: fjall
53+
- name: Clippy
54+
run: cargo clippy
55+
working-directory: fjall
56+
- name: Run tests
57+
run: cargo test -v -- --nocapture
58+
working-directory: fjall
59+
env:
60+
RUST_LOG: debug
61+
- name: Build & test examples
62+
run: node compile_examples.mjs
63+
working-directory: fjall
64+
cross:
65+
cancel-timeout-minutes: 20
66+
name: cross
67+
strategy:
68+
matrix:
69+
target:
70+
- aarch64-unknown-linux-gnu
71+
# - aarch64-linux-android
72+
- aarch64-unknown-linux-musl
73+
# - i686-linux-android
74+
# - x86_64-linux-android
75+
# - i686-unknown-linux-gnu
76+
- powerpc64-unknown-linux-gnu
77+
#- mips64-unknown-linux-gnuabi64
78+
- riscv64gc-unknown-linux-gnu
79+
#- x86_64-apple-darwin
80+
#- aarch64-apple-darwin
81+
runs-on: ubuntu-latest
82+
steps:
83+
- uses: actions/checkout@v4
84+
- name: cross build --target ${{ matrix.target }}
85+
run: |
86+
cargo install cross
87+
cross build --target ${{ matrix.target }}

.github/workflows/test.yml renamed to .github/workflows/test_lsmt.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Tests
22

33
on:
44
# TODO: remove
@@ -14,11 +14,12 @@ env:
1414

1515
jobs:
1616
test:
17+
cancel-timeout-minutes: 20
1718
strategy:
1819
matrix:
1920
rust_version:
2021
- stable
21-
- "1.74.0"
22+
- "1.74.0" # MSRV
2223
os:
2324
- ubuntu-latest
2425
- windows-latest
@@ -39,33 +40,37 @@ jobs:
3940
with:
4041
prefix-key: ${{ runner.os }}-cargo
4142
workspaces: >
42-
. -> target
43-
examples/actix-kv -> target
44-
examples/actix-triplestore -> target
45-
examples/structured -> target
43+
lsm-tree -> target
44+
lsm-tree/examples/kv -> target
4645
- name: Build
4746
run: cargo build -v
47+
working-directory: lsm-tree
4848
- name: Format
4949
run: cargo fmt --all -- --check
50+
working-directory: lsm-tree
5051
- name: Clippy
5152
run: cargo clippy
53+
working-directory: lsm-tree
5254
- name: Run tests
5355
run: cargo test -v -- --nocapture
56+
working-directory: lsm-tree
5457
env:
5558
RUST_LOG: debug
56-
- name: Build & test examples
59+
- name: Build & test LSM examples
5760
run: node compile_examples.mjs
61+
working-directory: lsm-tree
5862
cross:
63+
cancel-timeout-minutes: 20
5964
name: cross
6065
strategy:
6166
matrix:
6267
target:
6368
- aarch64-unknown-linux-gnu
64-
- aarch64-linux-android
69+
# - aarch64-linux-android
6570
- aarch64-unknown-linux-musl
66-
- i686-linux-android
67-
- x86_64-linux-android
68-
- i686-unknown-linux-gnu
71+
# - i686-linux-android
72+
# - x86_64-linux-android
73+
# - i686-unknown-linux-gnu
6974
- powerpc64-unknown-linux-gnu
7075
#- mips64-unknown-linux-gnuabi64
7176
- riscv64gc-unknown-linux-gnu

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Cargo.lock
1717

1818
/target
1919
.lsm.data
20+
.fjall_data
2021
.data
22+
.fjall_data
2123

22-
levels.json
24+
/old_*

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"rust-analyzer.showUnlinkedFileNotification": false
3+
}

Cargo.toml

Lines changed: 6 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,12 @@
1-
[package]
2-
name = "lsm-tree"
3-
description = "A K.I.S.S. implementation of log-structured merge trees (LSM-trees/LSMTs)"
4-
version = "0.2.3"
1+
[workspace]
2+
resolver = "2"
3+
members = ["lsm-tree", "fjall"]
4+
5+
[workspace.package]
56
edition = "2021"
67
rust-version = "1.74.0"
78
license = "MIT OR Apache-2.0"
89
readme = "README.md"
910
keywords = ["database", "lsmt", "lsm", "rocksdb", "leveldb"]
1011
categories = ["data-structures", "database-implementations", "algorithms"]
11-
repository = "https://github.com/marvin-j97/lsm-tree"
12-
include = ["src/**/*", "LICENSE", "README.md"]
13-
14-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
15-
16-
[lib]
17-
name = "lsm_tree"
18-
path = "src/lib.rs"
19-
20-
[features]
21-
default = []
22-
segment_history = []
23-
24-
[dependencies]
25-
byteorder = "1.5.0"
26-
chrono = "0.4.31"
27-
crc32fast = "1.3.2"
28-
crossbeam-skiplist = "0.1.1"
29-
fs_extra = "1.3.0"
30-
log = "0.4.20"
31-
lz4_flex = "0.11.1"
32-
min-max-heap = "1.3.0"
33-
quick_cache = { version = "0.4.0", default-features = false, features = [] }
34-
rand = "0.8.5"
35-
serde = { version = "1.0.193", features = ["derive", "rc"] }
36-
serde_json = "1.0.108"
37-
std-semaphore = "0.1.0"
38-
tempfile = "3.8.1"
39-
40-
[dev-dependencies]
41-
criterion = { version = "0.5.1", features = ["html_reports"] }
42-
env_logger = "0.10.1"
43-
nanoid = "0.4.0"
44-
test-log = "0.2.14"
45-
46-
# [[bench]]
47-
# name = "lsmt"
48-
# harness = false
12+
homepage = "https://github.com/marvin-j97/fjall"

LICENSE-MIT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 marvin-j97
3+
Copyright (c) 2024 marvin-j97
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)