Skip to content

fix: Improve cancellation handling for gRPC non-decoupled inference #8220

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 4 commits into from
May 29, 2025

Conversation

pskiran1
Copy link
Member

@pskiran1 pskiran1 commented May 23, 2025

What does the PR do?

This PR is intended to fix the following issue:

  • In gRPC inference for a non-decoupled model, where the response and final flag are sent separately, if the client cancels the request before the final flag is sent (while sending the response), the related response_release_payload will be deleted during the cancellation handling. This causes a problem because the next call to InferResponseComplete (sending the final flag) will attempt to use a state that no longer exists.

Made changes to the existing test cases to cover more test data. Also added new test cases, test_grpc_async_cancel and test_grpc_async, to test the code changes.

Checklist

  • PR title reflects the change and is of format <commit_type>: <Title>
  • Changes are described in the pull request.
  • Related issues are referenced.
  • Populated github labels field
  • Added test plan and verified test passes.
  • Verified that the PR passes existing CI.
  • Verified copyright is correct on all changed files.
  • Added succinct git squash message before merging ref.
  • All template sections are filled out.
  • Optional: Additional screenshots for behavior/output changes with before/after.

Commit Type:

Check the conventional commit type
box here and add the label to the github PR.

  • build
  • ci
  • docs
  • feat
  • fix
  • perf
  • refactor
  • revert
  • style
  • test

Related PRs:

Where should the reviewer start?

Test plan:

  • CI Pipeline ID: 28983978

Caveats:

Background

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • closes GitHub issue: #xxx

@pskiran1 pskiran1 added the bug Something isn't working label May 23, 2025
@pskiran1 pskiran1 marked this pull request as ready for review May 23, 2025 17:36
@pskiran1 pskiran1 requested a review from yinggeh May 25, 2025 14:14
Copy link
Contributor

@yinggeh yinggeh left a comment

Choose a reason for hiding this comment

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

Nice fix

@pskiran1 pskiran1 merged commit 27cece9 into main May 29, 2025
3 checks passed
@pskiran1 pskiran1 deleted the spolisetty_dlis_8315_fix branch May 29, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

2 participants