aws-c-s3 icon indicating copy to clipboard operation
aws-c-s3 copied to clipboard

async pause for get

Open TingDaoK opened this issue 8 months ago • 1 comments

Issue #, if available:

  • Our current pause doesn't support GetObject
  • The pause is currently just grabbing the status while background threads still running
  • When CRT control the write to the file, it means the file write can happen after the pause is called (race between those two threads.)
  • When downstream wants to gather the file last modified time, it makes the API hard to use. User needs to call the pause, and then wait for the finish callback to gather more data from user's side.
  • Add an async API for pause to notify caller when the write/events completed.

Description of changes:

  • Schedule an event for pause, when the event invokes, the other events should have finished the callbacks.
  • If people invoke the pause and wait for it to complete from one of the callbacks, they may end up with dead lock...
    • warnings??

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

TingDaoK avatar Apr 04 '25 21:04 TingDaoK

Codecov Report

Attention: Patch coverage is 20.58824% with 54 lines in your changes missing coverage. Please review.

Project coverage is 88.97%. Comparing base (5eac79f) to head (799b98c).

Files with missing lines Patch % Lines
source/s3_meta_request.c 13.15% 33 Missing :warning:
source/s3_auto_ranged_get.c 33.33% 16 Missing :warning:
source/s3_client.c 16.66% 5 Missing :warning:
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #506      +/-   ##
==========================================
- Coverage   89.70%   88.97%   -0.74%     
==========================================
  Files          20       20              
  Lines        6381     6447      +66     
==========================================
+ Hits         5724     5736      +12     
- Misses        657      711      +54     
Files with missing lines Coverage Δ
source/s3_auto_ranged_put.c 92.36% <ø> (ø)
source/s3_util.c 96.85% <ø> (ø)
source/s3_client.c 90.86% <16.66%> (-0.40%) :arrow_down:
source/s3_auto_ranged_get.c 93.29% <33.33%> (-3.97%) :arrow_down:
source/s3_meta_request.c 89.39% <13.15%> (-2.68%) :arrow_down:
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov-commenter avatar Apr 04 '25 21:04 codecov-commenter