You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor persistence around storage-owned HNSW and add Phase 1 write admission
Move canonical vector and metadata ownership into the single-file storage engine and refactor collection-backed HNSW to operate on stable internal ordinals through a provider boundary. HNSW nodes now own topology plus optional derived compressed vectors instead of raw vectors, string IDs, or metadata.
Add binary single-file persistence, reopen/rebuild coverage, memory accounting updates, acceptance tests, and OpenClaw memory benchmarks/profile hooks. Follow up with targeted memory reductions across storage, WAL, and HNSW allocation hot paths.
Add Phase 1 collection write admission control with bounded queued writers, conservative default write concurrency, queue-full and cancellation handling, and clamped batch/streaming worker concurrency for safer plugin and subagent usage. Update README and design docs to reflect the new single-file persistence model and concurrency behavior.
Copy file name to clipboardExpand all lines: README.md
+80-23Lines changed: 80 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,16 +45,17 @@
45
45
46
46
## 🎯 Overview
47
47
48
-
LibraVDB is a high-performance, production-ready vector database library designed specifically for Go applications. Built from the ground up with performance, scalability, and developer experience in mind, it provides enterprise-grade vector similarity search capabilities with support for multiple indexing algorithms, advanced quantization techniques, and sophisticated metadata filtering.
48
+
LibraVDB is a high-performancevector database library for Go applications. It provides similarity search, metadata-aware retrieval, batch and streaming ingestion, and persistent single-file storage with HNSW, IVF-PQ, and Flat indexing.
49
49
50
50
### Why LibraVDB?
51
51
52
52
-**🚀 Performance First**: Optimized for high-throughput insertions and sub-millisecond search latency
53
53
-**🔧 Go Native**: Designed specifically for Go with idiomatic APIs and zero external dependencies
54
-
-**📈 Production Ready**: Comprehensive error handling, observability, and recovery mechanisms
54
+
-**📈 Durable by Default**: Single-file binary persistence with reopen/rebuild support
55
55
-**🧠 Memory Efficient**: Advanced quantization and memory mapping for large-scale deployments
56
56
-**🔍 Feature Rich**: Complex filtering, streaming operations, and automatic optimization
57
57
-**📊 Observable**: Built-in metrics, health checks, and performance monitoring
58
+
-**🛡️ Safer Writes**: Bounded write admission for concurrent, batch, and streaming writers
58
59
59
60
## ✨ Key Features
60
61
@@ -64,16 +65,44 @@ LibraVDB is a high-performance, production-ready vector database library designe
64
65
-**Rich Metadata Filtering**: Complex AND/OR/NOT operations with type-safe schemas
65
66
-**Streaming Operations**: High-throughput batch processing with backpressure control
66
67
-**Memory Management**: Configurable limits, memory mapping, and automatic optimization
67
-
-**Persistent Storage**: LSM-tree architecture with Write-Ahead Log for durability
68
+
-**Persistent Storage**: Single-file binary storage with WAL-backed durability
69
+
-**Storage-Owned HNSW**: Canonical vectors and metadata live in storage; HNSW owns graph topology plus optional compressed artifacts
68
70
69
71
### Enterprise Features
70
72
-**Observability**: Prometheus metrics, health checks, and distributed tracing
71
73
-**Error Recovery**: Automatic recovery mechanisms and circuit breakers
72
74
-**Performance Monitoring**: Real-time performance metrics and optimization suggestions
73
-
-**Concurrent Access**: Thread-safe operations with fine-grained locking
75
+
-**Concurrent Access**: Thread-safe operations with bounded write admission and queueing
74
76
-**Configuration Management**: Extensive configuration options with validation
75
77
-**Documentation**: Comprehensive API documentation and usage guides
76
78
79
+
## 📦 Persistence Model
80
+
81
+
LibraVDB persists databases as a single `.libravdb` file.
82
+
83
+
- Importing the package does not create files.
84
+
- A database file is created or opened when you call `libravdb.New(...)`.
85
+
- If no path is provided, the default path resolves to `./data.libravdb`.
86
+
-`WithStoragePath(...)` should point to a database file such as `./mydb.libravdb`.
87
+
- The `.libravdb` file is the portable unit you can move or copy after closing the database.
88
+
89
+
For HNSW-backed collections:
90
+
- canonical raw vectors and metadata are stored once in canonical storage
91
+
- HNSW uses internal ordinals and provider-backed vector access
92
+
- HNSW nodes do not own raw vectors or metadata
93
+
- optional compressed vectors remain index-owned derived data
94
+
95
+
## 🛡️ Write Concurrency Safety
96
+
97
+
LibraVDB now includes a Phase 1 write-admission layer intended to make local and plugin-style usage safer.
98
+
99
+
- direct writes, batch writes, and streaming writes are admitted through a bounded per-collection write gate
100
+
- queued writers are bounded instead of piling up indefinitely
101
+
- waiting writers respect context cancellation
102
+
- batch and streaming worker counts are clamped to collection write parallelism
103
+
104
+
This improves safety under bursty or subagent-style write traffic, but it is not yet the full adaptive scheduler. If you expect very heavy write concurrency, keep batch and streaming concurrency conservative and prefer one coordinated writer path per collection.
105
+
77
106
## 📊 Performance Benchmarks
78
107
79
108
LibraVDB delivers exceptional performance across various workloads and scales:
0 commit comments