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

Don't sleep before sending an exec request #2345

Merged
merged 1 commit into from
Oct 16, 2024
Merged

Don't sleep before sending an exec request #2345

merged 1 commit into from
Oct 16, 2024

Conversation

pawalt
Copy link
Member

@pawalt pawalt commented Oct 16, 2024

The underlying bug that requires this sleep has been fixed.

Describe your changes

  • Resolves MOD-4076
Backward/forward compatibility checks

Check these boxes or delete any item (or this section) if not relevant for this PR.

  • Client+Server: this change is compatible with old servers
  • Client forward compatibility: this change ensures client can accept data intended for later versions of itself

Note on protobuf: protobuf message changes in one place may have impact to
multiple entities (client, server, worker, database). See points above.


The underlying bug that requires this sleep has been fixed.
@pawalt pawalt requested a review from irfansharif October 16, 2024 18:03
@@ -388,8 +388,8 @@ async def _get_task_id(self):
while not self._task_id:
resp = await self._client.stub.SandboxGetTaskId(api_pb2.SandboxGetTaskIdRequest(sandbox_id=self.object_id))
self._task_id = resp.task_id
# TODO: debug why sending an exec right after a task ID exists fails silently
await asyncio.sleep(0.5)
if not self._task_id:
Copy link
Member

Choose a reason for hiding this comment

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

When do we not get a task ID back, and why are we sleeping for those cases? How come we're not removing the sleep completely?

Copy link
Member Author

Choose a reason for hiding this comment

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

We shouldn't hammer the RPC - it would hot loop otherwise.

@pawalt pawalt merged commit 8892499 into main Oct 16, 2024
22 checks passed
@pawalt pawalt deleted the pawalt/sb_wait branch October 16, 2024 18:46
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.

2 participants