Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 17.7k
Allow DBDagBag TTL cache eviction without a size cap#69774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Uh oh!
There was an error while loading. Please reload this page.
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
3fd75d2
Allow DBDagBag TTL cache eviction without a size cap
aeroyorch d33b25b
Update comment
aeroyorch c7e358a
Honour [api] dag_cache_ttl when dag_cache_size is 0
aeroyorch 28a8c01
address review comments on dag cache docs and add improvement newsfra…
aeroyorch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4 airflow-core/docs/administration-and-deployment/web-stack.rst
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ``[api] dag_cache_ttl`` is now honored when ``[api] dag_cache_size = 0``, giving the API server TTL-based eviction of cached serialized Dags with no size cap. Previously ``dag_cache_size = 0`` disabled eviction entirely and silently ignored ``dag_cache_ttl``. To keep the previous fully-unbounded behavior, set ``dag_cache_ttl = 0`` as well. |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1704,7 +1704,11 @@ api: | ||
| dag_cache_size: | ||
| description: | | ||
| Size of the LRU cache for SerializedDAG objects in the API server. | ||
| Set to 0 to use an unbounded dict (no eviction, matching pre-3.2 behavior). | ||
| Set to 0 to remove the size cap. Cached entries are then evicted only by | ||
aeroyorch marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| ``dag_cache_ttl``, or never if that is also 0 (matching pre-3.3 behavior). | ||
| Note that the TTL is then not a ceiling on memory. Entries that keep being | ||
| requested are refreshed and never expire, so memory usage follows the number | ||
| of distinct Dag versions in active use. | ||
| The cache is keyed by Dag version ID, so lookups by Dag ID | ||
| (e.g., viewing a Dag's details) always query the database for the latest | ||
| version, but the deserialized result is cached for subsequent | ||
| @@ -1717,7 +1721,9 @@ api: | ||
| description: | | ||
| Time-to-live (seconds) for cached SerializedDAG objects in the API server. | ||
| After this time, cached DAGs will be re-fetched from the database on next access. | ||
| Set to 0 to disable TTL (cache entries will only be evicted by LRU policy). | ||
| Applies whether or not ``dag_cache_size`` sets a size cap. Set to 0 to disable TTL, | ||
| leaving eviction to the ``dag_cache_size`` LRU policy, or no eviction at all if | ||
| ``dag_cache_size`` is also 0. | ||
| Note: After a DAG is updated, the API server may serve the previous version | ||
| until the cached entry expires. Lower values reduce staleness but increase | ||
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.