Skip to content

Conversation

@cachemeifyoucan
Copy link
Contributor

It is technically possible for different threads trying to write output files at the same time, e.g. multi-threaded WMO. It can cause a race condition to update the output status in the CAS output backend. Use a lock to protect the update and finalization of CAS entries.

@cachemeifyoucan cachemeifyoucan changed the title [CAS] Pretect the CASOutputbackend with multi-threaded updates [CAS] Protect the CASOutputbackend with multi-threaded updates Jul 7, 2025
@cachemeifyoucan cachemeifyoucan force-pushed the eng/PR-lock-output-cas-output-backend branch from 3c1490a to c0c7c8a Compare July 7, 2025 23:41
@cachemeifyoucan cachemeifyoucan changed the title [CAS] Protect the CASOutputbackend with multi-threaded updates [CAS] Protect the CASOutputBackend from multi-threaded updates Jul 7, 2025
@cachemeifyoucan cachemeifyoucan force-pushed the eng/PR-lock-output-cas-output-backend branch from c0c7c8a to 286018d Compare July 7, 2025 23:41
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

It is technically possible for different threads trying to write output
files at the same time, e.g. multi-threaded WMO. It can cause a race
condition to update the output status in the CAS output backend. Use a
lock to protect the update and finalization of CAS entries.
@cachemeifyoucan cachemeifyoucan force-pushed the eng/PR-lock-output-cas-output-backend branch from 286018d to a816444 Compare July 8, 2025 16:46
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan cachemeifyoucan merged commit 9ae27d7 into swiftlang:main Jul 8, 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