-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow concurrency limits to handle changing the default limit (#27112)
## Summary & Motivation This PR adds a default flag to the storage layer, to help track which limits inherit from the default versus limits that are explicitly set. This allows us to change the default and helps us to change those limit values. Currently, the `concurrency > default_op_concurrency_limit` setting is only used to initialize the number of slots for "unconfigured" keys. Now, we keep track of the slots that are initialized from a default value and update them if the default value has changed. ## How I Tested These Changes BK ## Changelog - Adds the ability to distinguish between explicitly set pool limits and default-set pool limits. Requires a schema migration using `dagster instance migrate`.
- Loading branch information
Showing
10 changed files
with
313 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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 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
32 changes: 32 additions & 0 deletions
32
...r/_core/storage/alembic/versions/048_7e2f3204cf8e_add_column_concurrency_default_limit.py
This file contains 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,32 @@ | ||
"""add column concurrency default limit | ||
Revision ID: 7e2f3204cf8e | ||
Revises: 6b7fb194ff9c | ||
Create Date: 2025-01-13 15:19:19.331752 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
from dagster._core.storage.migration.utils import has_column, has_table | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "7e2f3204cf8e" | ||
down_revision = "6b7fb194ff9c" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
if has_table("concurrency_limits"): | ||
if not has_column("concurrency_limits", "using_default_limit"): | ||
op.add_column( | ||
"concurrency_limits", | ||
sa.Column("using_default_limit", sa.Boolean(), nullable=False, default=False), | ||
) | ||
|
||
|
||
def downgrade(): | ||
if has_table("concurrency_limits"): | ||
if has_column("concurrency_limits", "using_default_limit"): | ||
op.drop_column("concurrency_limits", "using_default_limit") |
This file contains 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 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
Oops, something went wrong.