public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Jason Tishler <jason@tishler.net>
To: cygwin@cygwin.com
Subject: Re: Add retry logic to rebaseall
Date: Fri, 17 Jan 2014 16:13:00 -0000	[thread overview]
Message-ID: <20140117161333.GA59772@tishler.net> (raw)
In-Reply-To: <20140116085431.GB26205@calimero.vinschen.de>

On Thu, Jan 16, 2014 at 09:54:31AM +0100, Corinna Vinschen wrote:
> On Jan 16 01:19, Christopher Faylor wrote:
> > On Wed, Jan 15, 2014 at 11:23:08PM -0500, David Boyce wrote:
> > >Jason et al,
> > >
> > >Here's a suggested new flag (with patch, attached) for
> > >/usr/bin/rebaseall. It adds a -w(ait) flag which causes the check for
> > >running Cygwin processes to be done in a loop, breaking out and doing
> > >the rebaseall as soon as it finds a quiescent moment.
> > 
> > +1
> > 
> > Seems like a good idea to me.
> 
> ACK.  Jason, shall I apply the patch?

AFAICT, there is a race condition issue with the proposed functionality.
David's build servers could be quiescent when the check for running
processes is performed, but they could restart before the rebase is
finished.  I realize the window is very small, but it is nevertheless
nonzero, so the rebase could still fail.

The patch could be enhanced to check the status of the rebase and retry
if the rebase failed and the wait option was specified.  This would fix
the race condition.

There are also formatting issues with the patch.  For example, the
addition of the while loop requires lines to be shifted to the right.
I know rebaseall unfortunately has a mixture of tabs and spaces, but
after applying the patch some lines are not indented correctly.

IMO, the proposed functionality is very specialized and doesn't seem to
be generally applicable.  This functionality could also be implemented
(by the few who need it) as a very simple wrapper script that calls
rebaseall until is succeeds.  This approach would also workaround the
race condition.

I'm not enamored with this change, but I will go along with the
consensus.  If we decide to move forward, then I would like the race
condition and formatting issues resolved.

Thanks,
Jason

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2014-01-17 16:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-16  4:23 David Boyce
2014-01-16  6:19 ` Christopher Faylor
2014-01-16  8:54   ` Corinna Vinschen
2014-01-17 16:13     ` Jason Tishler [this message]
2014-01-17 16:31       ` David Boyce
2014-01-17 17:45         ` Jason Tishler
2014-01-17 17:50           ` Christopher Faylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140117161333.GA59772@tishler.net \
    --to=jason@tishler.net \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).