-
Notifications
You must be signed in to change notification settings - Fork 17
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
Co-operatively cancel Tentacle Client Operations #730
Co-operatively cancel Tentacle Client Operations #730
Conversation
6b77e55
to
e138114
Compare
61593ed
to
1d27a7b
Compare
e138114
to
e9dd8f0
Compare
1d27a7b
to
f3a499b
Compare
ea8c002
to
9b19f36
Compare
501bda6
to
a2e09aa
Compare
return false; | ||
} | ||
|
||
// TODO: Make this type safe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have tests that will catch if this stops working but it needs to be improved. This will be done in a future PR
return false; | ||
} | ||
|
||
// TODO: Make this type safe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have tests that will catch if this stops working but it needs to be improved. This will be done in a future PR
3138dea
to
acf9581
Compare
@@ -28,7 +28,7 @@ | |||
</Otherwise> | |||
</Choose> | |||
<ItemGroup> | |||
<PackageReference Include="Halibut" Version="7.0.368" /> | |||
<PackageReference Include="Halibut" Version="7.0.393-pull-576" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO Bump when OctopusDeploy/Halibut#576 merges
acf9581
to
e41c315
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Some small changes to the original PR, but they look legit 😁
e41c315
to
cc3a220
Compare
This is the reverted PR #647 rebased
Background
[sc-58429]
Related to: OctopusDeploy/Halibut#525
Before Async Halibut was introduced, an RPC the was transferring (reading or writing over a TCP Connection) could not be cancelled in Halibut, only an RPC that was connecting could be cancelled.
Async Halibut, along with OctopusDeploy/Halibut#525 has added the ability to cancel RPC whether connecting or transferring. This allows the caller of Halibut to cancel an RPC with a cancellation token co-operatively.
Before Async Halibut, abandoning a Transferring RPC was the only way to "cancel" it. That is, run it as a different Task and walk away from the running Task if a cancellation was performed. While this method would allow the caller to regain control flow, it left the Task still executing and left IO operations on TCP Connection from Tentacle Client to Tentacle active.
Results
Before
Tentacle Client only supported the cancellation of connecting RPC. If an RPC was transferred, cancellation could not be performed, and the caller would have to wait for the RPC to complete.
Tentacle Client used the abandon technique for RPC Retry Timeouts, as it was the only reliable way to timeout the Retries and return control flow to the caller.
After
Tentacle Client will co-operatively cancel RPC to the Socket, stopping active reads and writes over TCP Connections.
Tentacle Client will co-operatively cancel RPC to the Socket when RPC Retries Timeout.
How to review this PR
Quality ✔️
Pre-requisites