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

Perf optimize NDC RPC replication, reducing DB calls #1392

Merged
merged 3 commits into from Mar 27, 2021

Conversation

wxing1292
Copy link
Contributor

What changed?

  • Rename ReadLevel to MinTaskID, MaxReadLevel to MaxTaskID
  • Add hint in replication task source reducing unnecessary DB read
  • Add periodical sanity check in replication task source in case of timeout err
  • Treat last replication task ID vs replication task pagination ID differently

Why?
Reduce unnecessary DB read for replication tasks
Close #1354

How did you test it?
New tests, local run, CICD

Potential risks
N/A

Is hotfix candidate?
No

@wxing1292 wxing1292 requested a review from a team March 22, 2021 20:20
@wxing1292 wxing1292 changed the title Perf optimize NDC RPC replication Perf optimize NDC RPC replication, reducing DB calls Mar 22, 2021
@wxing1292 wxing1292 force-pushed the perf-rpc-replication branch 3 times, most recently from 44cf2ea to 6215955 Compare March 22, 2021 20:45
* Rename ReadLevel to MinTaskID, MaxReadLevel to MaxTaskID
* Add hint in replication task source reducing unnecessary DB read
* Add periodical sanity check in replication task source in case of timeout err
* Treat last replication task ID vs replication task pagination ID differently
fetchTasksBatchSize int
pageSize int

sync.Mutex
Copy link
Member

Choose a reason for hiding this comment

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

I think it is good practice to place embedded types on top but in this case, I believe it worth to be a named field maxTaskIDMutex.

@wxing1292 wxing1292 enabled auto-merge (squash) March 27, 2021 03:45
@wxing1292 wxing1292 merged commit eed9144 into temporalio:master Mar 27, 2021
@wxing1292 wxing1292 deleted the perf-rpc-replication branch April 26, 2021 23:29
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.

High GetReplicationTasks QPS on clusters without any connected clients
2 participants