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

Update force merge polling #489

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

VijayanB
Copy link
Member

Description

Change force merge polling logic to use wait_for_completion
to false, to make it async and use task's get api to check
whether task is completed or not to exit from force merge.

Here, request end time is calcuated only after task is completed.
This request end time will not be 100% accurate, since, we use polling to check
whether task status is completed or not.

Issues Resolved

Testing

  • New functionality includes testing

[Describe how this change was tested]


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@VijayanB VijayanB force-pushed the update-force-merge-polling branch 4 times, most recently from 8880977 to e17abfd Compare March 26, 2024 02:57
@VijayanB
Copy link
Member Author

@gkamat @IanHoang Can this be reviewed and added to 1.4 release?

@gkamat gkamat added the 1.5.0 label Mar 28, 2024
@VijayanB
Copy link
Member Author

VijayanB commented Apr 2, 2024

@gkamat @IanHoang Any update on this?

osbenchmark/worker_coordinator/runner.py Outdated Show resolved Hide resolved
osbenchmark/worker_coordinator/runner.py Outdated Show resolved Hide resolved
osbenchmark/worker_coordinator/runner.py Show resolved Hide resolved
tests/worker_coordinator/runner_test.py Outdated Show resolved Hide resolved
request_context_holder.on_client_request_end()
complete = True
break
await asyncio.sleep(params.get("poll-period"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

What happens when a connection timeout is thrown if a long poll period is specified and control returns to the caller?

Copy link
Member Author

Choose a reason for hiding this comment

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

Did you mean when connection timeout is thrown during get task api?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, admittedly a small possibility, but any exceptions raised by the client will get caught by the caller otherwise.

tests/worker_coordinator/runner_test.py Show resolved Hide resolved
@VijayanB VijayanB requested a review from gkamat April 12, 2024 22:28
@VijayanB
Copy link
Member Author

@gkamat can you take look at one more time. Thanks

Change force merge polling logic to use wait_for_completion
to false, to make it async and use task's get api to check
whether task is completed or not to exit from force merge.

Here, request end time is calcuated only after task is completed.
This request end time will not be 100% accurate, since, we use polling to check
whether task status is completed or not.

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
Copy link
Collaborator

@gkamat gkamat left a comment

Choose a reason for hiding this comment

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

Just responded to your earlier comments. Will take a look at the new updates that were just force-pushed when I get a chance, for approval. Thanks for the changes.

Copy link
Collaborator

@IanHoang IanHoang left a comment

Choose a reason for hiding this comment

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

Left a couple comments

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
@VijayanB
Copy link
Member Author

@IanHoang Updated PR with your feedback, Can you take a look one more time ? Thanks.

@VijayanB
Copy link
Member Author

@gkamat Can you take a look at this PR? This change is blocker for some of our runs that depends on large force merge time.

@gkamat gkamat merged commit c42a787 into opensearch-project:main Apr 23, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants