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

Async wf consumer manager should watch its enabled/disabled state instead of relying on restart #5966

Conversation

taylanisikdemir
Copy link
Contributor

What changed?
Worker creates the ConsumerManager only if worker.enableAsyncWorkflowConsumption is set to true. Enabling this property at runtime has no effect. This means workers have to be restarted after dynamic property changes which is not ideal.
Similarly disabling this property doesn't stop consumer manager and requires restart to take effect. In emergency situations it might be handy to quickly stop the async request queue consumption.

Why?
Avoid restarts for enabling/disabling ConsumerManager.

How did you test it?
New unit test which enables, disables and re-enables consumer manager.

@taylanisikdemir taylanisikdemir merged commit 0c1bdca into cadence-workflow:master May 2, 2024
18 checks passed
@coveralls
Copy link

Pull Request Test Coverage Report for Build 018f3b3c-928c-43e0-b33d-857843399566

Details

  • 44 of 49 (89.8%) changed or added relevant lines in 2 files are covered.
  • 72 unchanged lines in 10 files lost coverage.
  • Overall coverage decreased (-0.009%) to 68.122%

Changes Missing Coverage Covered Lines Changed/Added Lines %
service/worker/asyncworkflow/async_workflow_consumer_manager.go 44 46 95.65%
service/worker/service.go 0 3 0.0%
Files with Coverage Reduction New Missed Lines %
common/task/weighted_round_robin_task_scheduler.go 2 89.05%
service/history/task/transfer_active_task_executor.go 2 72.9%
service/matching/taskListManager.go 2 81.16%
common/membership/hashring.go 2 84.69%
common/persistence/historyManager.go 2 66.67%
common/persistence/statsComputer.go 3 96.07%
common/task/fifo_task_scheduler.go 4 85.57%
service/history/task/fetcher.go 4 86.08%
service/history/task/task_util.go 20 70.57%
service/history/execution/mutable_state_task_refresher.go 31 56.65%
Totals Coverage Status
Change from base Build 018f3ade-e831-49de-8d50-1cfcf0e4bf6a: -0.009%
Covered Lines: 100070
Relevant Lines: 146898

💛 - Coveralls

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