docs/internals/adr/gaps/009-no-leading-edge-prioritization.md
Status: Open Discovered: 2026-02-19 Context: Cloud-native storage characteristics analysis (leading edge prioritization, freshness)
Quickwit's compaction does not prioritize recent time windows over older ones. The merge planner treats all eligible windows equally, processing them in whatever order it discovers merge candidates. This means that the leading edge — the most recent time windows where small files accumulate fastest and queries are most frequent — competes for compaction resources with older windows that are less query-hot.
At high ingestion rates, the leading edge accumulates hundreds of thousands of small splits per 15-minute window (see ADR-003). If compaction doesn't keep up with this accumulation, query performance on recent data degrades because every query must fan out to all those small splits. This is the most visible and impactful degradation, because observability queries overwhelmingly target recent data (dashboards, alerts, incident investigation).
New data visibility is also affected. The system does not prioritize making freshly-ingested data queryable over performing compaction on older data. In extremis, compaction of old windows should yield resources to ensure new data is visible within the ingest-to-query latency SLO (e.g., 30s p99.9).
The StableLogMergePolicy (which ADR-003 proposes adapting for metrics) does not have a concept of window priority. It evaluates merge candidates based on maturity and document count, not based on the age of the time window or the urgency of compaction for query performance.
There is no mechanism to:
All signals equally affected. Leading edge prioritization is signal-agnostic — any signal with high write rates and time-range queries benefits.