Skip to content

Commit aed141f

Browse files
authored
Merge pull request #12 from monoscope-tech/memtable
Introduce a WAL, and write data in memory which gets saved to delta in 10mins interval, to reduce the small files problem.
2 parents 2421ec5 + a176e0a commit aed141f

21 files changed

+3704
-459
lines changed

.env.minio

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ MAX_PG_CONNECTIONS=100
2121
# MinIO doesn't need DynamoDB locking, use local locking
2222
AWS_S3_LOCKING_PROVIDER=""
2323

24+
# WAL storage directory for walrus-rust
25+
WALRUS_DATA_DIR=/tmp/walrus-wal
26+
2427
# Foyer cache configuration for tests
2528
TIMEFUSION_FOYER_MEMORY_MB=256
2629
TIMEFUSION_FOYER_DISK_GB=10

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,13 @@ jobs:
6262
ENABLE_BATCH_QUEUE: "true"
6363
MAX_PG_CONNECTIONS: "100"
6464
AWS_S3_LOCKING_PROVIDER: ""
65-
TIMEFUSION_FOYER_MEMORY_MB: "256"
66-
TIMEFUSION_FOYER_DISK_GB: "10"
67-
TIMEFUSION_FOYER_TTL_SECONDS: "300"
68-
TIMEFUSION_FOYER_SHARDS: "8"
65+
WALRUS_DATA_DIR: /tmp/walrus-wal
66+
# Use small cache sizes for CI tests (similar to test_config in object_store_cache.rs)
67+
TIMEFUSION_FOYER_MEMORY_MB: "10"
68+
TIMEFUSION_FOYER_DISK_MB: "50"
69+
TIMEFUSION_FOYER_METADATA_MEMORY_MB: "10"
70+
TIMEFUSION_FOYER_METADATA_DISK_MB: "50"
71+
TIMEFUSION_FOYER_SHARDS: "2"
6972
services:
7073
minio:
7174
image: public.ecr.aws/bitnami/minio:latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ minio
99
dis-newstyle
1010
*.log
1111
.DS_Store
12+
wal_files/

Cargo.lock

Lines changed: 37 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ edition = "2024"
66
[dependencies]
77
tokio = { version = "1.48", features = ["full"] }
88
datafusion = "51.0.0"
9+
datafusion-datasource = "51.0.0"
910
arrow = "57.1.0"
1011
arrow-json = "57.1.0"
1112
uuid = { version = "1.17", features = ["v4", "serde"] }
@@ -68,8 +69,12 @@ ahash = "0.8"
6869
lru = "0.16.1"
6970
serde_bytes = "0.11.19"
7071
dashmap = "6.1"
72+
envy = "0.4"
7173
tdigests = "1.0"
72-
bincode = "2.0"
74+
bincode = { version = "2.0", features = ["serde"] }
75+
walrus-rust = "0.2.0"
76+
thiserror = "2.0"
77+
strum = { version = "0.27", features = ["derive"] }
7378

7479
[dev-dependencies]
7580
sqllogictest = { git = "https://github.com/risinglightdb/sqllogictest-rs.git" }
@@ -78,6 +83,7 @@ datafusion-common = "51.0.0"
7883
tokio-postgres = { version = "0.7.10", features = ["with-chrono-0_4"] }
7984
scopeguard = "1.2.0"
8085
rand = "0.9.2"
86+
tempfile = "3"
8187

8288
[features]
8389
default = []

0 commit comments

Comments
 (0)