Skip to content

feat(apollo-forest-run): auto eviction per partition#652

Closed
vladar wants to merge 3 commits intomainfrom
vladar/fr-clear-partition
Closed

feat(apollo-forest-run): auto eviction per partition#652
vladar wants to merge 3 commits intomainfrom
vladar/fr-clear-partition

Conversation

@vladar
Copy link
Contributor

@vladar vladar commented Mar 24, 2026

Overview

Add per-partition auto eviction to ForestRun.

Details

  • Add per-partition autoEvict option to PartitionConfig — when enabled, evicts oldest operations in the partition automatically on writes to that partition
  • Refactor eviction internals: extract groupByPartition, unify evictOldData to accept pre-grouped ops, consolidate all auto eviction logic into maybeAutoEvict

How it works

Each partition in unstable_partitionConfig.partitions can now set autoEvict: true. When a write lands in such a partition,
maybeAutoEvict detects the affected partition from the transaction changelog, groups operations by partition (single pass), applies a 2x threshold check, and calls evictOldData with the filtered map. Non-partitioned writes still use the global autoEvict + maxOperationCount path.

@github-actions
Copy link

github-actions bot commented Mar 24, 2026

📊 Benchmark Analysis Report

No significant performance changes detected


Threshold: 5% change


Updated: 2026-03-24T18:29:04.957Z

@vladar vladar changed the title feat(apollo-forest-run): clearPartition API feat(apollo-forest-run): auto eviction per partition Mar 24, 2026
@vladar vladar closed this Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant