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

Increase number of forward tokens for isolation tasklists #5310

Merged
merged 1 commit into from
Jun 2, 2023

Conversation

Shaddoll
Copy link
Contributor

@Shaddoll Shaddoll commented Jun 2, 2023

What changed?
Increase number of forward tokens for isolation tasklists

Why?
Fix the latency degradation for scalable tasklists with isolation

How did you test it?
staging2 test

Potential risks

Release notes

Documentation Changes

@coveralls
Copy link

coveralls commented Jun 2, 2023

Pull Request Test Coverage Report for Build 01887cfb-f41d-4b04-991b-c636745b5a60

  • 11 of 11 (100.0%) changed or added relevant lines in 2 files are covered.
  • 184 unchanged lines in 29 files lost coverage.
  • Overall coverage decreased (-0.1%) to 57.207%

Files with Coverage Reduction New Missed Lines %
service/history/queue/timer_queue_processor_base.go 1 78.15%
client/history/client.go 2 38.1%
client/history/metricClient.go 2 45.3%
common/cache/lru.go 2 92.2%
common/persistence/nosql/nosqlplugin/cassandra/tasks.go 2 75.57%
common/persistence/sql/common.go 2 50.65%
common/persistence/sql/sqlplugin/mysql/db.go 2 83.33%
common/persistence/sql/sqlplugin/postgres/db.go 2 85.0%
service/history/handler.go 2 47.15%
service/history/shard/context.go 2 66.52%
Totals Coverage Status
Change from base Build 01887cb7-0d4e-4055-97e5-d9bc2fa7e521: -0.1%
Covered Lines: 86934
Relevant Lines: 151963

💛 - Coveralls

@@ -91,19 +93,21 @@ func newForwarder(
taskListID *taskListID,
kind types.TaskListKind,
client matching.Client,
isolationGroups []string,
Copy link
Contributor

@davidporter-id-au davidporter-id-au Jun 2, 2023

Choose a reason for hiding this comment

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

Is this intended to be that private-package type? Would you mind renaming this parameter to indicate it's purpose, as the term 'isolation-groups' can mean multiple things - the groups associated with a service which are available, all the isolation-groups, the poller-available isolation-groups etc.

(I am guessing this is all?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's allisolationgroups if isolation is enabled, it's nil if not

) *Forwarder {
rpsFunc := func() float64 { return float64(cfg.ForwarderMaxRatePerSecond()) }
fwdr := &Forwarder{
cfg: cfg,
client: client,
taskListID: taskListID,
taskListKind: kind,
outstandingTasksLimit: int32(cfg.ForwarderMaxOutstandingTasks()),
outstandingPollsLimit: int32(cfg.ForwarderMaxOutstandingPolls()),
outstandingTasksLimit: int32(cfg.ForwarderMaxOutstandingTasks() * (len(isolationGroups) + 1)),
Copy link
Contributor

@davidporter-id-au davidporter-id-au Jun 2, 2023

Choose a reason for hiding this comment

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

Mind adding a comment here as to the intuition of this?

From the context I'm guessing that you're saying that the limit should be larger for tasklists when isolation-groups are enabled so as to prevent thrash for partitioned tasklists, but it's not immediately obvious looking at the code and it's surrounds

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is an intuition in line 264

@Shaddoll Shaddoll merged commit 339c103 into uber:master Jun 2, 2023
@Shaddoll Shaddoll deleted the fix-isolation branch June 2, 2023 17:20
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