Skip to content

[5.6] store lock files in temporary directory (#273) #275

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

Merged
merged 1 commit into from
Dec 23, 2021

Conversation

tomerd
Copy link
Contributor

@tomerd tomerd commented Dec 23, 2021

5.6 cherry pick of #273

motivation: local file system store lock files next to the file being locked and never cleans them up

changes:
* add a tempDirectory to FileSystem protocol
* update determineTempDirectory to use tempDirectory from localFileSystem
* move logic to handle local file system locks to FileLock and call it from localFileSystem
* expose an API on FileLock to create local file system locks, which by default uses the temp directory to store lock files, using the file-to-lock path and name to construct the lock file name
* move local file system lock logic to use the new FileLock API
* add tests

rdar://86644116
@tomerd tomerd added the swift 5.6 This PR targets the 5.6 branch label Dec 23, 2021
@tomerd
Copy link
Contributor Author

tomerd commented Dec 23, 2021

1 similar comment
@tomerd
Copy link
Contributor Author

tomerd commented Dec 23, 2021

@tomerd
Copy link
Contributor Author

tomerd commented Dec 23, 2021

CI failures seem to be due to network issues on CI nodes. cc @shahmishal

@tomerd
Copy link
Contributor Author

tomerd commented Dec 23, 2021

@tomerd
Copy link
Contributor Author

tomerd commented Dec 23, 2021

cc @abertelrud for 5.6 review

@tomerd tomerd added the ready Author believes the PR is ready to be merged & any feedback has been addressed label Dec 23, 2021
@tomerd tomerd merged commit c40a559 into swiftlang:release/5.6 Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Author believes the PR is ready to be merged & any feedback has been addressed swift 5.6 This PR targets the 5.6 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants