-
Notifications
You must be signed in to change notification settings - Fork 860
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
Queue refactor part 6: shard context #2511
Conversation
proto/internal/temporal/server/api/persistence/v1/executions.proto
Outdated
Show resolved
Hide resolved
} | ||
|
||
func (s *ContextImpl) UpdateTransferAckLevel(ackLevel int64) error { | ||
func (s *ContextImpl) updateScheduledTaskMaxReadLevel(cluster string) tasks.Key { |
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.
this name is a bit misleading. It is getting the timer queue's max read level based on current 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.
The method is kinda do two things. First update the max read level based on current time or remote cluster time, and then return the updated value. So I think the name does make sense to me. Any suggestion for a better name?
// TODO: | ||
// 1. when deprecating old ack level related fields, use shardInfo.QueueAckLevels | ||
// for calculating queue processing lag and diff. Current those old ack level fields | ||
// are updated together with the new QueueAckLevels, so metrics can still be emitted | ||
// correctly. | ||
// 2. instead of having separate metric definition for each task category, we should | ||
// use one metrics (or two, one for immedidate task, one for scheduled task), | ||
// and add tags indicating the task category. |
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.
👍 please file an issue to track this.
What changed?
Shard context change for queue processor refactor
Why?
How did you test it?
Existing tests
Potential risks
Is hotfix candidate?
no