Skip to content

Sharding#11

Merged
sig5 merged 5 commits into
mainfrom
sharding
Apr 25, 2026
Merged

Sharding#11
sig5 merged 5 commits into
mainfrom
sharding

Conversation

@sig5
Copy link
Copy Markdown
Owner

@sig5 sig5 commented Apr 25, 2026

Fixes #6 . Added Shard's that are locked for writes.

FAIL
sakarsinghal@Sakars-Mac-mini lorem-lsm % go test -bench=BenchmarkPutConcurrent ./db
goos: darwin
goarch: arm64
pkg: lorem-lsm/db
cpu: Apple M4
BenchmarkPutConcurrent/bloom=true,lock=true,shardCount=1-10 142864 10246 ns/op
BenchmarkPutConcurrent/bloom=false,lock=true,shardCount=1-10 120465 11651 ns/op
BenchmarkPutConcurrent/bloom=true,lock=true,shardCount=2-10 155450 10179 ns/op
BenchmarkPutConcurrent/bloom=false,lock=true,shardCount=2-10 134534 8539 ns/op
PASS
ok lorem-lsm/db 6.116s
sakarsinghal@Sakars-Mac-mini lorem-lsm % go test -bench=BenchmarkGetConcurrent ./db
goos: darwin
goarch: arm64
pkg: lorem-lsm/db
cpu: Apple M4
BenchmarkGetConcurrent/bloom=true,lock=true,shardCount=1-10 690308 1577 ns/op
BenchmarkGetConcurrent/bloom=false,lock=true,shardCount=1-10 667656 1530 ns/op
BenchmarkGetConcurrent/bloom=true,lock=true,shardCount=5-10 21271268 812.5 ns/op
BenchmarkGetConcurrent/bloom=false,lock=true,shardCount=5-10 23123714 675.9 ns/op
PASS
ok lorem-lsm/db 39.041s

@sig5 sig5 merged commit 19d2a15 into main Apr 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add row level locking to optimize performance

1 participant