-
Notifications
You must be signed in to change notification settings - Fork 831
Refactor history queue factory #6907
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
Conversation
) | ||
for _, factory := range queueFactories { | ||
historyEngImpl.queueProcessors[factory.Category()] = factory.CreateQueue( | ||
shard, |
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.
shard.SetEngine() is called later in this function but the queue factory is calling shard.GetEngine(). Let's make sure the dependencies are clear and future proof.
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 queue processors are depending on shard context and history engine. History engine is depending on shard context.
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.
What is not clear is the dependency between history engine and shard context, but it's unrelated to this PR.
@@ -204,14 +215,16 @@ func (e *historyEngineImpl) generateGracefulFailoverTasksForDomainUpdateCallback | |||
|
|||
func (e *historyEngineImpl) lockTaskProcessingForDomainUpdate() { | |||
e.logger.Debug("Locking processing for domain update") | |||
e.txProcessor.LockTaskProcessing() | |||
e.timerProcessor.LockTaskProcessing() | |||
for _, processor := range e.queueProcessors { |
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.
not in the scope of this PR but let's see if we really need to lock task processing for these domain change callbacks.
What changed?
Refactor history queue factory
Why?
To unify some methods for creating history queues, which will make it a lot easier to introduce queuev2.
How did you test it?
unit tests
Potential risks
Release notes
Documentation Changes