Skip to content
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

Merged
merged 8 commits into from
Feb 23, 2022

Conversation

yycptt
Copy link
Member

@yycptt yycptt commented Feb 16, 2022

What changed?
Shard context change for queue processor refactor

Why?

How did you test it?
Existing tests

Potential risks

Is hotfix candidate?
no

@yycptt yycptt marked this pull request as ready for review February 16, 2022 19:11
@yycptt yycptt requested a review from a team as a code owner February 16, 2022 19:11
service/history/shard/context_impl.go Outdated Show resolved Hide resolved
}

func (s *ContextImpl) UpdateTransferAckLevel(ackLevel int64) error {
func (s *ContextImpl) updateScheduledTaskMaxReadLevel(cluster string) tasks.Key {
Copy link
Member

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.

Copy link
Member Author

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?

Comment on lines +1011 to +1018
// 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.
Copy link
Member

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.

@yycptt yycptt merged commit 0c40243 into temporalio:master Feb 23, 2022
@yycptt yycptt deleted the queue-refactor-shard branch February 23, 2022 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants