Skip to content

Spawn new thread for processing echo requests #396

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 1 commit into from
May 31, 2023
Merged

Spawn new thread for processing echo requests #396

merged 1 commit into from
May 31, 2023

Conversation

mbaltrimas
Copy link
Contributor

Description

Currently, echo requests are blocking the ScuService thread allowing for only one request to be processed at a time. Long running requests (such as the ones failing to reach its target) will cause consecutive echo requests to be delayed, eventually resulting in timeouts. To avoid this, the PR makes a change to spawn a new thread for each call to Process.

This also adds a change that passes the HttpContext.RequestAborted cancellation token down the chain so that processing of echo requests could be cancelled if the http request is aborted.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • All tests passed locally.
  • Documentation comments included/updated.
  • User guide updated.
  • I have updated the changelog

Signed-off-by: Mindaugas Baltrimas <[email protected]>
@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Merging #396 (3ca9bc1) into develop (d27c8e3) will increase coverage by 0.00986%.
The diff coverage is 100.00000%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##             develop        #396         +/-   ##
===================================================
+ Coverage   79.63869%   79.64855%   +0.00986%     
===================================================
  Files            328         328                 
  Lines          20647       20657         +10     
  Branches         955         955                 
===================================================
+ Hits           16443       16453         +10     
  Misses          3876        3876                 
  Partials         328         328                 
Flag Coverage Δ
unittests 79.64855% <100.00000%> (+0.00986%) ⬆️

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

Impacted Files Coverage Δ
.../InformaticsGateway/Services/Scu/ScuWorkRequest.cs 55.00000% <ø> (ø)
...eway/Services/Http/DestinationAeTitleController.cs 92.52336% <100.00000%> (+0.52335%) ⬆️
src/InformaticsGateway/Services/Scu/ScuService.cs 74.59016% <100.00000%> (+0.64057%) ⬆️
...rmaticsGateway/Test/Services/Scu/ScuServiceTest.cs 98.36066% <100.00000%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d27c8e3...3ca9bc1. Read the comment docs.

@mbaltrimas mbaltrimas merged commit 70bd3da into develop May 31, 2023
@neildsouth neildsouth added the enhancement Enhancement to existing feature label Jun 1, 2023
@neildsouth neildsouth added this to the 0.3.20 milestone Jun 1, 2023
neildsouth added a commit that referenced this pull request Jun 1, 2023
Spawn new thread for processing echo requests (#396)
@github-actions
Copy link

github-actions bot commented Jun 1, 2023

🎉 This issue has been resolved in version 0.3.20 🎉

The release is available on:

@mocsharp mocsharp deleted the AC-839 branch August 10, 2023 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants