Skip to content

SEA: Reduce network calls for synchronous commands #633

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

Open
wants to merge 3 commits into
base: sea-migration
Choose a base branch
from

Conversation

varun-edachali-dbx
Copy link
Collaborator

What type of PR is this?

  • Refactor

Description

In execute_command we first send the execute request to the server, following which, if the request is synchronous, we poll for the request state until it is no longer in the pending state. Following this, we make an additional GET request to the server to get the final request information. There are two areas of improvement:

  • if the request is small and completes execution (i.e., reaches the SUCCEEDED state) within the wait_timeout, then we need not poll for completion or make another GET request to the server. We can immediately construct our ResultSet with the provided response.
  • While we poll for the request state, if the state reaches SUCCEEDED then the response is accompanied by the response data that we need to construct the ResultSet. We need not make another GET request to the server after we are done polling and can instead utilise the last response provided.

How is this tested?

  • Unit tests
  • E2E Tests
  • Manually
  • N/A

Related Tickets & Documents

N/A

@varun-edachali-dbx varun-edachali-dbx marked this pull request as ready for review July 10, 2025 02:12
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.

1 participant