-
Notifications
You must be signed in to change notification settings - Fork 911
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
Start the archival queue iff history or visibility archival is enabled in the static config #3827
Start the archival queue iff history or visibility archival is enabled in the static config #3827
Conversation
46876a6
to
2c9c966
Compare
@@ -52,6 +52,7 @@ type ( | |||
ReadEnabled() bool | |||
GetNamespaceDefaultState() enumspb.ArchivalState | |||
GetNamespaceDefaultURI() string | |||
StaticClusterState() ArchivalState |
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.
can it use GetClusterState()?
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.
See below comment
queueFactorySet.TimerQueueFactory, | ||
queueFactorySet.VisibilityQueueFactory, | ||
} | ||
if archivalMetadata.GetHistoryConfig().StaticClusterState() == archiver.ArchivalEnabled || archivalMetadata.GetVisibilityConfig().StaticClusterState() == archiver.ArchivalEnabled { |
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.
can it call ClusterConfiguredForArchival?
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.
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.
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.
Make sense to me now. I guess this will be simplified after deprecate the archival workflow?
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.
Unfortunately, not really. The durable archival flag will be removed, but the two-tier archival switch will still exist, and we actually need to keep it that way.
…d in the static config (#3827) Enable archival queue factory iff it is enabled in the static config
…d in the static config (#3827) Enable archival queue factory iff it is enabled in the static config
What changed?
^title
Why?
We don't want to start the archival queue if there's no possibility that archival tasks will even be produced because a lot of users don't even use this feature.
How did you test it?
I added several unit tests to the QueueModule which verify that the archival queue factory is only provided conditionally, but all other queues are always provided.
Potential risks
None
Is hotfix candidate?
No