-
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
base: main
Are you sure you want to change the base?
Changes from all commits
be61432
87ae80e
36864fa
b96901b
9a41e9a
994cedb
dd19b25
0d9eb51
7a81262
f525e0f
1bdd110
7b38daf
c18ce5f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,9 +91,16 @@ func (s *PhysicalTaskQueueManagerTestSuite) SetupTest() { | |
| s.NoError(err) | ||
| engine.partitions[prtn.Key()] = prtnMgr | ||
|
|
||
| if s.fairness { | ||
| prtnMgr.config.NewMatcher = true | ||
| prtnMgr.config.EnableFairness = true | ||
| } else if s.newMatcher { | ||
| prtnMgr.config.NewMatcher = true | ||
| } | ||
|
Comment on lines
+94
to
+99
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. hmm, the stuff on line 70-74 doesn't take care of this? if we do need this, maybe we don't need that? reading this whole function again... it duplicates a lot of real code to set things up. I wish we could consolidate. but probably not now. |
||
|
|
||
| s.tqMgr, err = newPhysicalTaskQueueManager(prtnMgr, s.physicalTaskQueueKey) | ||
| s.NoError(err) | ||
| prtnMgr.defaultQueue = s.tqMgr | ||
| prtnMgr.defaultQueueFuture.Set(s.tqMgr, nil) | ||
| } | ||
|
|
||
| /* | ||
|
|
@@ -334,13 +341,17 @@ func (s *PhysicalTaskQueueManagerTestSuite) TestAddTaskStandby() { | |
| s.tqMgr.namespaceRegistry = mockNamespaceCache | ||
|
|
||
| s.tqMgr.Start() | ||
| ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) | ||
| err := s.tqMgr.WaitUntilInitialized(ctx) | ||
| s.Require().NoError(err) | ||
| 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 | ||
| s.tqMgr.tqCtxCancel() | ||
|
|
||
| err := s.tqMgr.SpoolTask(&persistencespb.TaskInfo{ | ||
| err = s.tqMgr.SpoolTask(&persistencespb.TaskInfo{ | ||
| CreateTime: timestamp.TimePtr(time.Now().UTC()), | ||
| }) | ||
| s.Equal(errShutdown, err) // task writer was stopped above | ||
|
|
||
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.
hmm, I think we usually put enums at the top-level. but I guess this is fine, we don't expect to use it anywhere else.