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

Create an FX Module for Archival #3726

Merged
merged 1 commit into from
Dec 28, 2022
Merged

Conversation

MichaelSnowden
Copy link
Contributor

What changed?

  • I added a Module to the service/history/archival package and embedded it in the history module
  • I also modified our existing tests to use this module instead of the raw constructor to improve test coverage

Why?
I made this change so that we can inject the required dependencies into the archival queue

How did you test it?
I tested this by modifying our tests to use this module instead of the normal constructor, and I then checked test coverage as well. I also ran a simple make start. Additionally, this dependency isn't required anywhere yet, so it shouldn't actually be run in prod.

Potential risks
None.

Is hotfix candidate?
No

@MichaelSnowden MichaelSnowden requested a review from a team as a code owner December 19, 2022 19:45
@MichaelSnowden MichaelSnowden changed the title Add an FX for archival to our history module. Create an FX Module for Archival Dec 19, 2022
Base automatically changed from durable-archival/range-variable to master December 20, 2022 20:16
service/history/workflow/fx.go Outdated Show resolved Hide resolved
common/dynamicconfig/constants.go Show resolved Hide resolved
Comment on lines 39 to 41
return quotas.NewRateLimiter(
config.ArchivalBackendMaxRPS(),
int(math.Ceil(config.ArchivalBackendMaxRPS())),
Copy link
Member

@yycptt yycptt Dec 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means changing rps requires a service restart to take effect, maybe use dynamic rate limiter? NewDefaultOutgoingRateLimiter?

Copy link
Contributor Author

@MichaelSnowden MichaelSnowden Dec 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, much better, thanks! Should I mark this old constructor as deprecated in favor of NewDefaultOutgoingRateLimiter?

@MichaelSnowden MichaelSnowden merged commit 4e8601a into master Dec 28, 2022
@MichaelSnowden MichaelSnowden deleted the durable-archival/module branch December 28, 2022 17:30
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