-
Notifications
You must be signed in to change notification settings - Fork 1.2k
auto enabling priority and fairness #8650
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
Draft
majiru
wants to merge
24
commits into
temporalio:main
Choose a base branch
from
majiru:fairness-and-priority-auto-enable
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,157
−436
Draft
Changes from 5 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
be61432
add code for auto enabling priority and fairness
majiru 87ae80e
use reasonable timeout for newTaskQueuePartitionManager in tests instead
majiru 36864fa
fix linting issues
majiru b96901b
Refactor OnChange to be set after initialization through a seperate
majiru 9a41e9a
Push taskQueuePartitionManager initialization into the background
majiru 994cedb
Address comments made in review and simplify implementation
majiru dd19b25
Fix physicalTaskQueueManager
majiru 0d9eb51
More lint fixes
majiru 7a81262
Guard the defaultQueue behind the future
majiru f525e0f
We need to wait on ready before checking the cancellation of our
majiru 1bdd110
make linter happy w.r.t deprecated functions
majiru 7b38daf
Rework how we signal and handle waiting on initialization
majiru c18ce5f
Small linting issue
majiru b285444
Use an autoenable rpc and address other comments
majiru 1ecb597
Be careful about updating UserData w.r.t. nill members in the path
majiru 03054e9
address comments regarding matching engine handler
majiru 9130ffa
Move matching engine handler to organize a bit better
majiru 26f3636
Address small comments in partition manager
majiru d28dee6
add GetIfReady() to our future and use it in partition manager
majiru 247c307
address rpc comments
majiru 3a8ff9f
fix generated files
majiru d0f1b17
add new rpc to quotas
majiru a533b20
remove duplicate config setting for priority and fairness
majiru 0f93485
Merge branch 'main' into fairness-and-priority-auto-enable
majiru File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
|---|---|---|
|
|
@@ -85,9 +85,15 @@ func (s *PhysicalTaskQueueManagerTestSuite) SetupTest() { | |
| prtn := s.physicalTaskQueueKey.Partition() | ||
| tqConfig := newTaskQueueConfig(prtn.TaskQueue(), engine.config, nsName) | ||
| onFatalErr := func(unloadCause) { s.T().Fatal("user data manager called onFatalErr") } | ||
| udMgr := newUserDataManager(engine.taskManager, engine.matchingRawClient, onFatalErr, nil, prtn, tqConfig, engine.logger, engine.namespaceRegistry) | ||
| udMgr := newUserDataManager(engine.taskManager, engine.matchingRawClient, onFatalErr, prtn, tqConfig, engine.logger, engine.namespaceRegistry) | ||
|
|
||
| prtnMgr, err := newTaskQueuePartitionManager(engine, ns, prtn, tqConfig, engine.logger, nil, metrics.NoopMetricsHandler, udMgr) | ||
| ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) | ||
| prtnMgr, err := newTaskQueuePartitionManager(ctx, engine, ns, prtn, tqConfig, engine.logger, nil, metrics.NoopMetricsHandler, udMgr) | ||
| s.NoError(err) | ||
| // Bit of a hack, we need to wait until the initialization is done but | ||
| // we don't want to start the default queue that it sets because we overwrite it later | ||
| err = prtnMgr.initGroup.Wait() | ||
| cancel() | ||
| s.NoError(err) | ||
| engine.partitions[prtn.Key()] = prtnMgr | ||
|
|
||
|
|
@@ -334,7 +340,10 @@ func (s *PhysicalTaskQueueManagerTestSuite) TestAddTaskStandby() { | |
| s.tqMgr.namespaceRegistry = mockNamespaceCache | ||
|
|
||
| s.tqMgr.Start() | ||
| ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe give 100ms even for a unit test |
||
| s.tqMgr.WaitUntilInitialized(ctx) | ||
| defer s.tqMgr.Stop(unloadCauseShuttingDown) | ||
| cancel() | ||
|
|
||
| // stop taskWriter so that we can check if there's any call to it | ||
| // otherwise the task persist process is async and hard to test | ||
|
|
||
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
Oops, something went wrong.
Oops, something went wrong.
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.