Skip to content

Conversation

@cachemeifyoucan
Copy link

  • Explanation: Improve the CAS validation to avoid false positives and improve coverage.
  • Scope: False positive in CAS validation can cause cache data lost unnecessarily.
  • Issues: rdar://155231696
  • Original PRs: CAS validation improvements #10966
  • Risk: Low. Caching build only. New code has gone through stress tests.
  • Testing: CAS validation stress test
  • Reviewers: @benlangmuir

* [CAS] Validate upstream CAS storage

When asked to validate the CAS, also validate the upstream CAS if
present. The entire upstream CAS is available as backup storage of the
currently active CAS. If the upstream CAS is corrupted, it can propagate
the error into downstream error, thus when upstream CAS is invalid, the
entire UnifiedCAS should be invalid.

* [CAS] Do not check if action cache value exists in the object store

Fix a false positive/crash when validating action cache from unified
data base by stop checking the cached value exists in the object store.
First of all, there is a bug that the check is always done against
primary object store, where the object can be missing. It is also
possible that the CAS is in a state where the cache keys are fault in,
but not the objects the cache pointed to. There is no good way to
enforce it, thus the check is too strict.

rdar://155231696
(cherry picked from commit 09bbceb)
@cachemeifyoucan cachemeifyoucan requested a review from a team as a code owner July 8, 2025 23:16
@cachemeifyoucan
Copy link
Author

@swift-ci please test

@akyrtzi akyrtzi merged commit 8b8af30 into swiftlang:swift/release/6.2 Jul 9, 2025
3 checks passed
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.

2 participants