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

Make sure task processing rate limiter is only done in the active side #5654

Merged
merged 5 commits into from
Feb 13, 2024

Conversation

sankari165
Copy link
Member

What changed?
Task processing rate limiting metrics is collected only in the active side.

Why?
We do not want to ratelimit task processing in passive side

How did you test it?
local and unit tests

Potential risks

Release notes

Documentation Changes

@sankari165 sankari165 enabled auto-merge (squash) February 12, 2024 15:17
@@ -195,6 +196,10 @@ func (t *transferActiveTaskExecutor) processActivityTask(
// release the context lock since we no longer need mutable state builder and
// the rest of logic is making RPC call, which takes time.
release(nil)

// Ratelimiting is not done. This is only to count the number of requests via metrics
t.wfIDCache.AllowInternal(task.DomainID, task.WorkflowID)
Copy link
Member

Choose a reason for hiding this comment

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

we need this in timer active task executor as well

Copy link
Member Author

Choose a reason for hiding this comment

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

It is not needed for timer tasks because we dont plan to rate limit timer tasks

@sankari165 sankari165 merged commit 701c628 into cadence-workflow:master Feb 13, 2024
16 checks passed
@coveralls
Copy link

Pull Request Test Coverage Report for Build 018da1c3-f0a6-4872-a788-97cbe2bbb7ad

Details

  • 0 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • 32 unchanged lines in 8 files lost coverage.
  • Overall coverage increased (+0.05%) to 62.745%

Files with Coverage Reduction New Missed Lines %
common/membership/hashring.go 2 84.05%
common/task/weighted_round_robin_task_scheduler.go 2 88.06%
service/history/task/fetcher.go 2 85.05%
tools/cli/admin_db_decode_thrift.go 2 70.13%
service/history/task/transfer_standby_task_executor.go 4 87.01%
service/matching/taskListManager.go 4 80.46%
common/persistence/sql/workflowStateMaps.go 8 81.25%
service/history/task/cross_cluster_task_processor.go 8 80.79%
Totals Coverage Status
Change from base Build 018d9fff-6d92-4602-a28b-a3ac312c9416: 0.05%
Covered Lines: 92591
Relevant Lines: 147568

💛 - 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.

4 participants