-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
feat(subscriptions): Allow scheduling watermark mode to be overridden #2791
Conversation
This is a temporary change that allows the scheduling watermark mode to be overridden in the combined scheduler/executor. This is needed for single tenant as we often have empty partitions there and this is incompatible with "global" mode. Once transactions are no longer semantically partitioned, this will not be necessary and this can be removed.
Can you define what a scheduling watermark mode is? |
@@ -70,6 +71,11 @@ | |||
help="Skip scheduling if timestamp is beyond this threshold compared to the system time", | |||
) | |||
@click.option("--log-level", help="Logging level to use.") | |||
@click.option( | |||
"--override-partition-mode", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Instead of calling this override-partition-mode, would it make more sense to call it --scheduling-mode
. What this means is that if a parameter is provided from the CLI then use that instead of the default configuration. That would make it more explicit what scheduling mode the consumer is running on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, ok
@click.option( | ||
"--override-partition-mode", | ||
type=click.Choice(["partition", "global"]), | ||
help="Skip scheduling if timestamp is beyond this threshold compared to the system time", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
help string has a copy/paste error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
@nikhars Updated with your feedback |
@onewland It defines whether scheduling happens either immediately or waits for all partitions. It's described in snuba/snuba/subscriptions/scheduler_processing_strategy.py Lines 180 to 201 in 8118e10
|
Codecov Report
@@ Coverage Diff @@
## master #2791 +/- ##
==========================================
- Coverage 92.87% 92.76% -0.11%
==========================================
Files 610 609 -1
Lines 28683 28594 -89
==========================================
- Hits 26638 26524 -114
- Misses 2045 2070 +25
Continue to review full report at Codecov.
|
…#2791) This is a temporary change that allows the scheduling watermark mode to be overridden in the combined scheduler/executor. This is needed for single tenant as we often have empty partitions there and empty partitions are incompatible with "global" mode. Once transactions are no longer semantically partitioned, this will not be necessary and this can be removed.
This is a temporary change that allows the scheduling watermark mode
to be overridden in the combined scheduler/executor. This is needed for
single tenant as we often have empty partitions there and empty partitions are
incompatible with "global" mode. Once transactions are no longer semantically
partitioned, this will not be necessary and this can be removed.