-
Notifications
You must be signed in to change notification settings - Fork 801
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
Implement matching API to allow updating task list partition config #6472
base: master
Are you sure you want to change the base?
Conversation
b69e487
to
4f6947d
Compare
3bc2459
to
8cd0c7c
Compare
domainID := request.DomainUUID | ||
taskListName := request.TaskList.GetName() | ||
taskListKind := request.TaskList.GetKind() | ||
taskListType := persistence.TaskListTypeDecision |
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: this is a little confusing to read to default like this, I'd suggest setting it to an zero value and switch below rather than defaulting
defer sw.Stop() | ||
|
||
if ok := h.userRateLimiter.Allow(quotas.Info{Domain: domainName}); !ok { | ||
return nil, hCtx.handleErr(errMatchingHostThrottle) |
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: a rate-limit event seems unlikely and probably worthy of a log
if err != nil { | ||
var e *types.EntityNotExistsError | ||
if !errors.As(err, &e) { | ||
c.Stop() |
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.
under what conditions would this occur? Could you add a comment if there's forseeable ones?
c.partitionConfigLock.RUnlock() | ||
return | ||
c.logger.Debug("get task list partition config from db", tag.Dynamic("root-partition", c.taskListID.GetRoot()), tag.Dynamic("config", config)) |
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.
the log key config
may conflict with other log structs using the same key in search indices and will result in the entire log-line being dropped. I'd just make it more unique with a name like tasklist-partition-config
to avoid this.
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.
some minor comments, but broadly I can't fault anything
Detailed Description
Define and implement new grpc APIs for matching:
Impact Analysis
Testing Plan
Rollout Plan
This PR introduces new matching API allowing us to Update and Refresh task list partition config which is stored in database. We'll have another PR exposing these endpoints in frontend, create CLI command for these endpoints and have integration tests covering this.