Disable paged cache when SSD cache init fails#1601
Open
lvsijian8 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When paged SSD cache is configured but the backing directory is unavailable or not writable, scheduler startup can leave partial cache state behind.
PagedSSDCacheManagerfails, butPagedCacheManager,BlockAwarePrefixCache, and the store-cache executor can still remain active.This is easy to hit when the cache directory points to an external drive that is not currently mounted.
Root cause
_init_tiered_cache()did not report whether paged SSD cache initialization succeeded. The scheduler therefore continued setting up the cache pipeline even after initialization failed.Fix
_init_tiered_cache()return whether setup succeeded.Tests
.venv/bin/pytest tests/test_scheduler.py::TestSchedulerInitialization::test_init_falls_back_when_paged_ssd_cache_unavailable -q.venv/bin/pytest tests/test_scheduler.py -q.venv/bin/pytest tests/test_scheduler.py::TestSchedulerConfig tests/test_cache_factory.py tests/test_paged_ssd_cache.py::TestPagedSSDCacheManager::test_initialization -q.venv/bin/pytest tests/test_cache_factory.py tests/test_paged_ssd_cache.py::TestPagedSSDCacheManager::test_initialization -q.venv/bin/ruff check --select I001,F401,F811 tests/test_scheduler.pygit diff --checkFixes #1455