-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Turns on the history scavenger for SQL backends #3452
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
Turns on the history scavenger for SQL backends #3452
Conversation
e1a04d7
to
2f41fdc
Compare
2f41fdc
to
6fbe551
Compare
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 PR title should be for SQL backends
not NoSQL?
go s.startWorkflowWithRetry(tlScannerWFStartOptions, tqScannerWFTypeName) | ||
workerTaskQueueNames = append(workerTaskQueueNames, tqScannerTaskQueueName) | ||
} else if s.context.cfg.Persistence.DefaultStoreType() == config.StoreTypeNoSQL && s.context.cfg.HistoryScannerEnabled() { | ||
} else if s.context.cfg.HistoryScannerEnabled() { |
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.
else
is not needed here? History scanner should be run if enabled regardless if task queue scanner is running or not I think.
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.
I'm not sure--that was the existing behavior
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.
I'll update it though because that makes sense to me
DefaultStore: config.StoreTypeSQL, | ||
ExpectedScanners: []expectedScanner{executionScanner}, | ||
}, | ||
} { |
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.
Plz add a test case where store type is SQL and all three scanners are enabled.
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.
Will do
Is it to enable for SQL or NoSQL? |
SQL--changed the PR comment |
I accidentally closed this PR and deleted the old branch while trying to rename the branch. The new PR is here: #3462 |
What changed?
In this PR, I enabled the history scanner to delete unused history tree branches.
Why?
I made these changes for #3419 in order to rule this out as an option for why disk usage is increasing so much over time for NoSQL backends.
How did you test it?
I added a new test to the Scanner which verifies that we actually start the scavenger now regardless of the storage backend we're using.
Potential risks
The biggest risk I can think of is that this change could turn on the scavenger for NoSQL backends, and it could have a bug which causes it to remove branches which it shouldn't, which could interfere with workflow progress and lead to data loss.
Is hotfix candidate?
This PR is not a hot fix candidate which requires a notification to the broader community. However, we should tell the people on the original PR that this fix is in, so that they can patch it and see if it fixes their issue.