Skip to content

Added option to gracefully shut down CAPIO server with SIGUSR1#157

Merged
marcoSanti merged 10 commits into
capio-v2from
gentle-shutdown-request
Aug 23, 2025
Merged

Added option to gracefully shut down CAPIO server with SIGUSR1#157
marcoSanti merged 10 commits into
capio-v2from
gentle-shutdown-request

Conversation

@marcoSanti
Copy link
Copy Markdown
Member

@marcoSanti marcoSanti commented Aug 22, 2025

This pull request introduces a new mechanism to gracefully shut down the capio_server component. To use this feature, send the SIGUSR1 signal to the CAPIO server component instead of the usual SIGTERM. The capio_server instance will then:

  • Reject all new handshake requests, forcing the workflow step that has sent it to terminate
  • Empty the request queues so that all non blocking requests can be processed
    And finally terminate the execution.

Other changes carried out includes:

  • moved from exit(EXIT_FAILURE) to using native c++ exceptions.
  • Fixed compilation warnings
  • Removed useless compilation targets

@marcoSanti marcoSanti force-pushed the gentle-shutdown-request branch 5 times, most recently from 10d542e to ddb7b03 Compare August 22, 2025 16:21
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 22, 2025

Codecov Report

❌ Patch coverage is 48.91304% with 47 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.69%. Comparing base (a7f0bd2) to head (59a33bd).
⚠️ Report is 1 commits behind head on capio-v2.

Files with missing lines Patch % Lines
src/posix/utils/filesystem.hpp 42.30% 6 Missing and 9 partials ⚠️
...c/server/client-manager/request_handler_engine.hpp 35.29% 8 Missing and 3 partials ⚠️
src/server/utils/signals.hpp 55.55% 8 Missing ⚠️
src/posix/handlers/copy_file_range.hpp 0.00% 2 Missing and 1 partial ⚠️
src/posix/handlers/posix_readdir.hpp 50.00% 2 Missing and 1 partial ⚠️
src/server/file-manager/file_manager_impl.hpp 0.00% 0 Missing and 3 partials ⚠️
src/server/capio-cl-engine/json_parser.hpp 0.00% 2 Missing ⚠️
src/common/capio/semaphore.hpp 0.00% 0 Missing and 1 partial ⚠️
src/server/client-manager/client_manager.hpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           capio-v2     #157      +/-   ##
============================================
- Coverage     44.83%   44.69%   -0.14%     
============================================
  Files            79       79              
  Lines          4403     4423      +20     
  Branches       2616     2630      +14     
============================================
+ Hits           1974     1977       +3     
- Misses         1195     1210      +15     
- Partials       1234     1236       +2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@marcoSanti marcoSanti force-pushed the gentle-shutdown-request branch from ddb7b03 to afc488a Compare August 22, 2025 16:29
@marcoSanti marcoSanti force-pushed the gentle-shutdown-request branch from afc488a to f1c0e1f Compare August 22, 2025 16:40
@marcoSanti marcoSanti force-pushed the gentle-shutdown-request branch from a24cd26 to 081ce5c Compare August 22, 2025 17:56
@marcoSanti marcoSanti force-pushed the gentle-shutdown-request branch from e4cefc5 to 59a33bd Compare August 23, 2025 08:21
@marcoSanti marcoSanti merged commit a218d32 into capio-v2 Aug 23, 2025
28 checks passed
@marcoSanti marcoSanti deleted the gentle-shutdown-request branch August 23, 2025 08:30
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.

1 participant