Commit 019ef8c
committed
refactor(engine): make StrictEngine, ColumnarEngine, and HtapBridge interior-mutable
Replaces outer `Mutex<Engine>` wrappers with per-engine interior locking:
- `StrictEngine` is natively `Send + Sync`; all public methods take `&self`
- `ColumnarEngine` moves to `RwLock<CollectionMap>` with per-collection
`Mutex<CollectionState>` so concurrent reads on different collections
do not block each other
- `HtapBridge` wraps its view map in a `Mutex` and exposes `&self` methods
- `RedbStorage` wraps `Database` in `Arc<Mutex<_>>` so async methods can
move a cheap clone into `spawn_blocking` closures
All call sites in `NodeDbLite`, the query DDL layer, the sync transport,
and integration tests are updated to drop the outer `.lock()` calls and
await engine futures directly, eliminating `block_in_place` workarounds
throughout the codebase.1 parent 798445a commit 019ef8c
32 files changed
Lines changed: 1203 additions & 1290 deletions
File tree
- nodedb-lite
- examples
- src
- engine
- columnar
- fts
- htap
- strict
- nodedb
- query
- ddl
- storage
- sync
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
| |||
321 | 322 | | |
322 | 323 | | |
323 | 324 | | |
| 325 | + | |
324 | 326 | | |
325 | 327 | | |
326 | 328 | | |
| |||
384 | 386 | | |
385 | 387 | | |
386 | 388 | | |
| 389 | + | |
387 | 390 | | |
388 | 391 | | |
389 | 392 | | |
| |||
433 | 436 | | |
434 | 437 | | |
435 | 438 | | |
| 439 | + | |
436 | 440 | | |
437 | 441 | | |
438 | 442 | | |
| |||
481 | 485 | | |
482 | 486 | | |
483 | 487 | | |
| 488 | + | |
484 | 489 | | |
485 | 490 | | |
486 | 491 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| |||
0 commit comments