Skip to content

Add a maximum page size and use the count instead of the list #10443

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

Merged
merged 2 commits into from
Feb 17, 2022

Conversation

benmoriceau
Copy link
Contributor

What

Add a page size and avoid storing the list result.

@benmoriceau benmoriceau requested a review from pmossman February 17, 2022 22:25
@benmoriceau benmoriceau temporarily deployed to more-secrets February 17, 2022 22:25 Inactive
@benmoriceau benmoriceau temporarily deployed to more-secrets February 17, 2022 22:25 Inactive
@github-actions github-actions bot added area/platform issues related to the platform area/worker Related to worker labels Feb 17, 2022
Copy link
Contributor

@pmossman pmossman left a comment

Choose a reason for hiding this comment

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

Approved other than small typo. Looking at the rest of the TemporalClient class, we use a similar pagination strategy here: https://github.com/airbytehq/airbyte/pull/10443/files#diff-391d9b999892f837218e35e29b9c6cf48e5b6316b6f3fc89791601c213931b0aL188-L212

But it looks like there we need to keep everything in memory. Will that method be used just for migrating OSS to the new scheduler? In that case it shouldn't pose a problem

.build();
do {
final ListOpenWorkflowExecutionsResponse listOpenWorkflowExecutionsRequest =
service.blockingStub().listOpenWorkflowExecutions(openWorkflowExecutionsRequest);
final List<WorkflowExecutionInfo> workflowExecutionInfos = listOpenWorkflowExecutionsRequest.getExecutionsList().stream()
final long matchingWorkflowCoumt = listOpenWorkflowExecutionsRequest.getExecutionsList().stream()
Copy link
Contributor

Choose a reason for hiding this comment

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

typo, matchingWorkflowCoumt -> matchingWorkflowCount

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@benmoriceau benmoriceau temporarily deployed to more-secrets February 17, 2022 23:03 Inactive
@benmoriceau benmoriceau temporarily deployed to more-secrets February 17, 2022 23:03 Inactive
@benmoriceau benmoriceau merged commit 9d546d3 into master Feb 17, 2022
@benmoriceau benmoriceau deleted the bmoric/flush-job-history-page branch February 17, 2022 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform issues related to the platform area/worker Related to worker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants