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

[Docs] Improve diagrams for hedging cancellation #1975

Merged
merged 3 commits into from
Feb 19, 2024

Conversation

martintmk
Copy link
Contributor

@martintmk martintmk commented Feb 19, 2024

Details on the issue fix or feature implementation

The cancellation behavior was not fully described, this PR fixes this:

image

Confirm the following

  • I started this PR by branching from the head of the default branch
  • I have targeted the PR to merge into the default branch
  • I have included unit tests for the issue/feature
  • I have successfully run a local build

Copy link

codecov bot commented Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1ce60b2) 83.64% compared to head (c271d57) 83.64%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1975   +/-   ##
=======================================
  Coverage   83.64%   83.64%           
=======================================
  Files         312      312           
  Lines        7106     7106           
  Branches     1056     1056           
=======================================
  Hits         5944     5944           
  Misses        789      789           
  Partials      373      373           
Flag Coverage Δ
linux 83.64% <ø> (ø)
macos 83.64% <ø> (ø)
windows 83.64% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@peter-csala
Copy link
Contributor

peter-csala commented Feb 19, 2024

Do you want to extend these as well:

cc: @martintmk

T->>P: Throws <br/>TimeoutRejectedException
P->>C: Propagates exception
```

> [!NOTE]
> Notice that the timeout waits until the callback is cancelled before throwing `TimeoutRejectedException`. Therefore it's important for the callbacks to respect the cancellation token passed to the execution. If the cancellation token is not correctly respected, the timeout is unnecessarily delayed.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
> Notice that the timeout waits until the callback is cancelled before throwing `TimeoutRejectedException`. Therefore it's important for the callbacks to respect the cancellation token passed to the execution. If the cancellation token is not correctly respected, the timeout is unnecessarily delayed.
> Notice that the timeout waits until the callback is cancelled before throwing `TimeoutRejectedException`. Therefore it's important for the callbacks to respect the cancellation token passed to the execution. If the cancellation token is not correctly respected, the timeout is unnecessarily delayed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just wondering: If we use Therefore it's important wording inside the note then would it make sense to use [!IMPORTANT] instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure makes sense, changed to important.

@martintmk martintmk merged commit 3e2164e into main Feb 19, 2024
17 checks passed
@martintmk martintmk deleted the mtomka/docs-hedging-cancellation branch February 19, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants