juergbi commented on issue #2120:
URL: https://github.com/apache/buildstream/issues/2120#issuecomment-4691709686

   `safe_link` used to be more performance critical in the past when it was 
used to stage build sandboxes. Now an extra syscall may be acceptable in order 
to have robust yet simple code.
   
   > My best bet is to make link operation more atomic by first making 
hard-link in some temp directory and them moving it to original destination.
   
   Yes, link to a temporary file, followed by a rename (which atomically 
replaces the destination) makes sense to me as well. We generally can't use a 
`/tmp` subdirectory, though, as hardlinks and renames are restricted to a 
single filesystem/mount. A temporary file in the destination directory should 
be fine, though.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to