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
Committer::launch_child_component_gc previously borrowed a read transaction from commit() and held it open through the entire spawn-and-await loop over child delete tasks. The fix opens a new read transaction scoped strictly to the list_tombstones call and drops it before spawning child tasks. With backends whose ReadTxn pins a shared resource (e.g., a fixed-size connection pool), holding the rtxn across async spawning could deadlock once cascade depth × per-level fanout exceeds capacity. LMDB's single-writer design doesn't surface this today, but the lifetime discipline is correct regardless and future-proofs the engine for alternative state-store backends.
Small, targeted lifetime fix — open a fresh RoTxn inside launch_child_component_gc, use it only for list_tombstones, drop before the async spawn-and-await block
No Python code to exclude; no feature-gating required
Aligns with recoco's correctness-first philosophy and prepares for potential future non-LMDB state-store backends
Integration Notes
This is a 5–10 line change in the committer. Identify the equivalent launch_child_component_gc function in recoco's engine code and verify it has the same rtxn lifetime pattern before applying. The fix is purely a scope narrowing — no API or behavior change.
Upstream Change Summary
Type: bug-fix
Difficulty: Easy
Recommendation: Adopt
Committer::launch_child_component_gcpreviously borrowed a read transaction fromcommit()and held it open through the entire spawn-and-await loop over child delete tasks. The fix opens a new read transaction scoped strictly to thelist_tombstonescall and drops it before spawning child tasks. With backends whoseReadTxnpins a shared resource (e.g., a fixed-size connection pool), holding the rtxn across async spawning could deadlock once cascade depth × per-level fanout exceeds capacity. LMDB's single-writer design doesn't surface this today, but the lifetime discipline is correct regardless and future-proofs the engine for alternative state-store backends.Upstream References
Relevant Upstream Files / Areas
rust/cocoindex/src/engine/—Committer::launch_child_component_gc,commit()Recoco Considerations
crates/recoco-core/src/engine/(committer module, GC sweep)RoTxninsidelaunch_child_component_gc, use it only forlist_tombstones, drop before the async spawn-and-await blockIntegration Notes
This is a 5–10 line change in the committer. Identify the equivalent
launch_child_component_gcfunction in recoco's engine code and verify it has the same rtxn lifetime pattern before applying. The fix is purely a scope narrowing — no API or behavior change.