When we build web software releases, we prepare the release in a temporary directory and then replace the release directory with the temporary one just prepared:
# Move and replace existing release directory.
mv /path/to/httpdocs /path/to/httpdocs.before
mv /path/to/$newReleaseName /path/to/httpdocs
Under this scheme, it happens that with about 1 in every 15 releases, a user was using a file in the original release directory exactly at the time the commands above are run, and a fatal error occurs for that user.
I am wondering if using symlinking like follows would be significantly faster, in terms of processing time, thereby helping to lessen the likelihood of this problem:
# Remove and replace existing release symlink.
ln -sf /path/to/$newReleaseName path/to/httpdocs