Files
seaweedfs/weed
Chris Lu ca42c5bbe4 parquet_pushdown(M1-C2): add footer LRU cache
Add weed/parquet_pushdown/footer/cache.go: a concurrent LRU keyed by
the Identity tuple (Path, SizeBytes, RecordCount, ETag) the design
specifies in Index Consistency. Mtime is intentionally absent.

Notable behavior:

- size <= 0 is rejected at construction so a misconfiguration cannot
  silently disable caching by sizing the LRU to zero.
- Hits / misses are tracked atomically and surfaced via Stats() so
  the service handler can stamp PushdownStats.footer_cache_hits /
  footer_cache_misses.
- GetOrLoad is a non-singleflight load helper. Concurrent loads for
  the same identity may both call the loader; that's an acceptable
  starting point given footer parses are millisecond-scale.
  Singleflight is deferred until profiling shows it matters.

Tests cover: zero-size rejected, hit/miss counters, identity is a
composite key (same path, different size = different entry),
LRU evicts above cap, GetOrLoad caches the result and dedupes
subsequent calls, errors propagate without inserting, and the cache
is safe under concurrent readers (-race).
2026-04-25 15:14:56 -07:00
..
2026-04-10 17:31:14 -07:00
2026-04-10 17:31:14 -07:00
2026-04-14 20:48:24 -07:00
2026-04-23 10:05:51 -07:00