flush() is durability work: it must cost what the current window's deltas cost, never what the history backlog costs. Under adaptive retention the byte budget derives from free memory, so bulk-load pressure shrank the budget exactly at peak write volume and flush paid actual reclaim inline — a production deployment measured single writes blocked 25-191s behind reclaim-on-flush. - flush() no longer calls autoCompactHistory(); close() is THE auto-compaction site (already ran there; now alone). - Every auto pass is time-bounded (CLOSE_COMPACTION_BUDGET_MS = 5s): reclamation is oldest-first, so an early stop is a consistent prefix and the next pass resumes. Explicit compactHistory() gains an optional timeBudgetMs for caller-chosen maintenance windows. - Documented trade stated where operators read: a long-lived writer that never closes accumulates history until its next explicit compactHistory() — predictable writes, explicit maintenance. Pins: flush-never-reclaims + close-reclaims-durably (db-mvcc), bounded pass stops-then-resumes as a consistent prefix (generationStore unit). |
||
|---|---|---|
| .. | ||
| aggregation.md | ||
| enterprise-for-everyone.md | ||
| export-and-import.md | ||
| external-backups-and-sparse-storage.md | ||
| find-limits.md | ||
| framework-integration.md | ||
| import-anything.md | ||
| import-flow.md | ||
| import-progress-examples.md | ||
| import-progress-implementation.md | ||
| import-quick-reference.md | ||
| inspection.md | ||
| installation.md | ||
| migrating-to-v4.md | ||
| MIGRATING_TO_V5.11.md | ||
| migration-3.36.0.md | ||
| model-loading.md | ||
| natural-language.md | ||
| nextjs-integration.md | ||
| optimistic-concurrency.md | ||
| quick-start.md | ||
| reacting-to-changes.md | ||
| schema-migrations.md | ||
| snapshots-and-time-travel.md | ||
| standard-import-progress.md | ||
| storage-adapters.md | ||
| streaming-imports.md | ||
| subtypes-and-facets.md | ||
| upgrading-7-to-8.md | ||
| vue-integration.md | ||