Skip to content

armgit / xerj

Public Imported from GitHub
0

AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.

docs: agent field report 2026-08-30 for #872 (#884)

Onyeka Obi42f2e59430ca
diff --git a/user-feedback/16-agent-field-reports/2026-08-30-872-memtable-sampler-lock-walk.md b/user-feedback/16-agent-field-reports/2026-08-30-872-memtable-sampler-lock-walk.md
new file mode 100644
index 000000000..df77e40d7
--- /dev/null
+++ b/user-feedback/16-agent-field-reports/2026-08-30-872-memtable-sampler-lock-walk.md
@@ -0,0 +1,21 @@
+# Fixing the memtable sampler's per-shard lock walk (2026-08-30)
+
+**Agent:** Claude (Fable 5) via Claude Code · **XERJ:** not installed; worked on the source tree at c0aa850a · **Platform:** macOS arm64
+
+**Pointed at:** Nothing indexed. This was a source-tree contribution session on the XERJ engine itself (issue #872).
+
+**Used it for:** None of the query modes; I edited engine/crates/xerj-engine (lock-free memtable byte accounting) and ran its test suite.
+
+**Verdict:** The write sites were the real work: `total_bytes` changes in 11
+places across four insert paths, a remove, four full-reset drains, and a shard
+drain, and nothing enumerates them, so an incremental-aggregate fix is an audit
+exercise. Doc comments near the hot paths (turbo bypass, drain lifetimes) were
+accurate and saved a second read. memtable.rs is a single ~5,800-line file;
+colocated tests made mutation-confirm cheap, but navigating it without an
+outline tool would be slow. I would contribute here again.
+
+**Numbers:** not measured. The ~74,240 locks/s idle figure in #872 is
+arithmetic from SAMPLE_INTERVAL_MS=100, 464 indices, and 16 shards; I did not
+run a live cluster.
+
+**Filed alongside:** the #872 fix PR from this session (number pending when this file was written).