Skip to content

feat(umbp): pluggable master eviction strategy#399

Merged
isytwu merged 2 commits into
mainfrom
feat/umbp-evict-strategy-plugin
Jun 18, 2026
Merged

feat(umbp): pluggable master eviction strategy#399
isytwu merged 2 commits into
mainfrom
feat/umbp-evict-strategy-plugin

Conversation

@isytwu

@isytwu isytwu commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Make UMBP distributed master-side eviction (DRAM/HBM) pluggable via a MasterEvictStrategy interface, mirroring the existing Route{Put,Get} strategy pattern. EvictionManager keeps watermark detection, candidate gathering, and EvictKey dispatch; the strategy only ranks candidates and picks victims within the per-(node,tier) byte budget. Default is LruMasterEvictStrategy (behavior unchanged), injected via MasterServerConfig::evict_strategy; no env knobs.
  • SSD eviction is intentionally left as the inline LRU in PeerSsdManager. A selector-only seam there would be a recency-only pseudo-plugin, since the per-algorithm state (recency/frequency/prefix) lives with the manager. A code comment records the target design (a stateful policy with OnAdd/OnTouch/OnRemove/Clear hooks + SelectVictims under the lock) for when a second SSD policy is actually needed.

The two commits are kept separate on purpose: the first adds the full master+SSD seam; the second walks the SSD seam back to master-only.

Test plan

  • test_umbp_master_evict_strategy (default LRU behavior) passes
  • Regression: test_peer_ssd_eviction, test_peer_ssd_manager, test_global_block_index_events, test_umbp_route_put_strategy pass
  • umbp_common / umbp_master build clean in the yutong-umbp container

isytwu added 2 commits June 16, 2026 12:40
Extract the hard-coded LRU into Route{Put,Get}-style strategy interfaces on the
master (MasterEvictStrategy) and SSD (SsdEvictStrategy) tiers, each defaulting
to LRU. Behavior unchanged; no env knobs.
Revert the SSD SsdEvictStrategy seam: a selector-only seam is a recency-only
pseudo-plugin, so SSD keeps its inline LRU with a note on the target design.
Master-side MasterEvictStrategy is unchanged.
@isytwu isytwu requested a review from TianDi101 June 16, 2026 12:44
@isytwu isytwu self-assigned this Jun 16, 2026
@isytwu isytwu merged commit 28eb3c7 into main Jun 18, 2026
13 checks passed
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