> I was wondering if anyone knows why Capistrano doesn't use an atomic > rename(2) operation (say, a mv) to replace the current symlink.
I believe it has to do with the possibility that on a newly deployed server the symlink might not exist in the first place. So a `mv` would fail. If this is really a reproducible problem for you (it's never been a problem anyone has reported in 5 years of Capistrano being mainstream) you can easily override `deploy:create_symlink` to meet your requirements, the original implementation, as I'm sure you saw is a handful of lines of very easy to read code. - Lee -- Lee Hambley Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Tuesday, March 6, 2012 at 4:52 AM, Dominic Scheirlinck wrote: > Hi, > > I was wondering if anyone knows why Capistrano doesn't use an atomic > rename(2) operation (say, a mv) to replace the current symlink. As it is, it > seems to remove the symlink and, if successful doing so, create the new one > in the same place. I'm worried that this could leave a gap of a fair few > cycles where the symlink doesn't exist at all, and requests fail. In other > words, it seems to use the shell for two consecutive operations that should > really be a single as-quick-as-possible operation; preferably one where the > current symlink is always readable and exists. > > Regards, > Dominic > > -- > * You received this message because you are subscribed to the Google Groups > "Capistrano" group. > * To post to this group, send email to [email protected] > (mailto:[email protected]) > * To unsubscribe from this group, send email to > [email protected] > (mailto:[email protected]) For more options, visit this > group at http://groups.google.com/group/capistrano?hl=en -- * You received this message because you are subscribed to the Google Groups "Capistrano" group. * To post to this group, send email to [email protected] * To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano?hl=en
