Skip to content

v0.14.0

Latest

Choose a tag to compare

@clemlesne clemlesne released this 07 Jul 11:23

seek gc gains a --sort flag and hardened table rendering. seek gc --dry-run --sort=size shows what is eating your disk.

Upgrade. No re-index, no cache-layout change, no removed flags. Automatic cache GC is unchanged — sorting is manual-only.

What changes for you

  • Sortable GC table. seek gc --sort=name|age|size: name (default, hash order), age (oldest .used first — the eviction order), size (largest first). Invalid --sort exits non-zero (was a silent no-op); shell completion lists the values.
  • Disk audit in one command. seek gc --dry-run --sort=size prints the plan by size, mutates nothing. Add --force to skip the daily throttle, --all to evict every corpus not in use.
  • Terabyte sizes. The SIZE column now renders TB caches (was GB-capped), still within its 6-char width.
  • Sane ages under clock skew. A future .used (NTP step, cp -p restore) renders 0s, not a negative raw-second blob.
  • Safe table cells. Control characters and tabs are stripped from displayed paths; left-truncation lands on rune boundaries, so multibyte paths never render orphan continuation bytes.
  • Documented maintenance. New README "Cache maintenance" section: auto-GC (14d TTL, once per day, off on NFS), the SEEK_GC_MAX_AGE / SEEK_GC_INTERVAL knobs, manual commands.

Dev/test

  • Dry-run and live GC paths unified so the tables cannot drift: shared gcTableStats, emitGCRow, predictGCAction/evictIfExpired, sweepCorpusOrphans, buildGCRows/sortGCRows. --sort values come from one gcSortValues list feeding both the parse error and completion.
  • Sorted views (age/size) measure all rows before rendering; name and the silent opportunistic path stream incrementally, keeping Ctrl-C prefix semantics.
  • releaseLock is now nil-safe, replacing hand-rolled unlock+close in runGC and evictCorpus.
  • Coverage: gc_sort_test.go (sort keys, tiebreaks, cancel), gc_format_test.go (TB, sanitize, rune boundaries, negative duration), a guard that the empty-cache live run still stamps .last-gc, and BenchmarkGC_RunGC_StreamingSorted_N100.
  • TODO(gc-size-cap): future SEEK_GC_MAX_TOTAL_SIZE (journalctl --vacuum-size style, LRU-by-age).

Full changelog: v0.13.2...v0.14.0