[Cache] Forward fast prefix matching capability (#37844)

This commit is contained in:
cctry
2026-09-03 10:33:30 -07:00
committed by GitHub
parent 54cadad151
commit 33a22b1b08
3 changed files with 11 additions and 1 deletions
@@ -31,11 +31,14 @@ class TestSchedulePolicyWaitingQueueMatching(unittest.TestCase):
policy.tree_cache = SimpleNamespace(supports_fast_match_prefix=lambda: True)
self.assertTrue(policy.waiting_queue_prefix_matched([]))
def test_lpm_queue_limit_can_disable_matching(self):
def test_lpm_queue_limit_respects_fast_matching_capability(self):
policy = self.make_policy(CacheAwarePolicy.LPM, False)
self.assertTrue(policy.waiting_queue_prefix_matched([None] * 128))
self.assertFalse(policy.waiting_queue_prefix_matched([None] * 129))
policy.tree_cache = SimpleNamespace(supports_fast_match_prefix=lambda: True)
self.assertTrue(policy.waiting_queue_prefix_matched([None] * 129))
class TestSchedulerLoadInquirer(unittest.TestCase):
def make_inquirer(self, waiting_queue_prefix_matched):