Repository navigation
fix(lmdb): tranh MDB_MAP_FULL bang auto-grow map truoc khi ghi - #61
Conversation
- Tăng default map size: 8 GiB (64-bit) / 1 GiB (32-bit), thay vì cứng 1 GiB - Thêm env override CODEGRAPH_LMDB_MAP_SIZE_MB để đặt map khởi đầu - begin_rw() grow map trước mỗi write txn khi dùng >= 50% map (trước: 25%) - grow_map Ziele max(map*2, used*4) để sau grow còn >= 75% trống, tránh cascade grow liền sau grow - Cap MAX_MAP_SIZE (64 GiB / 4 GiB) tránh runaway, trả MapFull nếu đã đạt - open_env_read_only dùng initial_map_size() thay vì cứng 1 GiB - Cập nhật docs/configuration.md [storage] với note map size + env var Cùng commit: privacy fix (pub mod -> mod + pub use re-export), meminfo doctests, clippy sạch mọi config, test workspace xong (trừ 4 redis pre-existing).
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (86.00%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #61 +/- ##
==========================================
+ Coverage 81.29% 81.33% +0.03%
==========================================
Files 105 105
Lines 30561 30643 +82
==========================================
+ Hits 24846 24922 +76
- Misses 5715 5721 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will not alter performance1 warning
Comparing |
Tom tat
Sua
MDB_MAP_FULLchan ingest LMDB tren repo lon. Thay doi ocrates/codegraph-graph/src/storage/lmdb.rs:LMDB map size
CODEGRAPH_LMDB_MAP_SIZE_MBde dat map khoi dau (vi du container han che address space)begin_rw()): khi du lieu dung >= 50% map, gap doi map truoc khi ghi -> khong bao gi chamMDB_MAP_FULLgiua luc ingestmax(map*2, used*4)-> sau grow con >= 75% trong, tranh cascade grow-lien-sau-growMAX_MAP_SIZE(64 GiB / 4 GiB) tranh runaway; neu da dat va van day -> traMapFullopen_env_read_onlydunginitial_map_size()thay vi cung 1 GiBCung commit (privacy follow-up)
pub mod->modchodiff/embeddings/meminfo/memtrack/vector_index, re-export dung API can thiet quapub usetai crate rootmeminfodoctests dungcodegraph_graph::{...}vss_lib_suffix/resolve_vss_extensionsgan#[cfg_attr(not(feature = "sqlite"), allow(dead_code))]Verify
cargo fmt --all -- -- check✅cargo clippy --workspace --all-targets -- -D warnings✅cargo test --workspace✅ (140+ passed; chi 4 teststorage::redisfail do khong co redis-server — pre-existing)CODEGRAPH_LMDB_MAP_SIZE_MB=1, map grows 2→256 MiB va on dinh, khongMDB_MAP_FULLPR
Mo tai
hungpham10/codegraph-rs(PRs sangCleboost/codegraph-rsbi chan GraphQL).