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

fix(s3): cleanup file cache after mpu task is cancelled #5128

Merged
merged 2 commits into from
Jul 9, 2024

Conversation

atierian
Copy link
Member

Issue #, if available:

Description of changes:

If a AWSS3TransferUtilityMultiPartUploadTask is cancelled by the caller, there's no use keeping the cached file around.
According to the File System Programming Guide, the /Library/Caches directory is rarely purged by the system:

Your app is generally responsible for managing the contents of this directory and for adding and deleting files as needed.
...
In iOS 5.0 and later, the system may delete the Caches directory on rare occasions when the system is very low on disk space. This will never occur while an app is running. However, be aware that restoring from backup is not necessarily the only condition under which the Caches directory can be erased.

Check points:

  • Added new tests to cover change, if needed
  • All unit tests pass
  • All integration tests pass
  • Updated CHANGELOG.md
  • Documentation update for the change if required
  • PR title conforms to conventional commit style

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

@atierian atierian requested review from awsmobilesdk and a team as code owners December 15, 2023 17:11
@zamzamfp
Copy link

zamzamfp commented Jul 8, 2024

Hi @atierian, I am having issues with the cache files, in my case it is really bad since file sizes are huge. is there a reason why this branch is not merged?

@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:31 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:31 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:31 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:31 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:31 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:31 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:31 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:31 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:31 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:31 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:31 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:31 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:31 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:31 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:31 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:31 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:31 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:32 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:32 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:32 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:32 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:32 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:32 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:32 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 9, 2024 14:32 — with GitHub Actions Inactive
@harsh62 harsh62 merged commit a0afc64 into main Jul 9, 2024
67 checks passed
@harsh62 harsh62 deleted the s3-mpu-cache-cleanup branch July 9, 2024 15:14
harsh62 added a commit that referenced this pull request Jul 15, 2024
harsh62 added a commit that referenced this pull request Jul 15, 2024
#5128)" (#5403)

* Revert "fix(s3): cleanup file cache after mpu task is cancelled (#5128)"

This reverts commit a0afc64.

* skip flaky test case
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.

4 participants