[PATCH 3 of 3] streamclone: use backgroundfilecloser (issue4889)

Yuya Nishihara yuya at tcha.org
Tue Jan 19 09:24:32 CST 2016


On Tue, 19 Jan 2016 10:23:53 +0100, Adrian Buehlmann wrote:
> On 2016-01-18 19:17, Gregory Szorc wrote:
> > On Mon, Jan 18, 2016 at 12:51 AM, Adrian Buehlmann <adrian at cadifra.com
> > <mailto:adrian at cadifra.com>> wrote:
> >     This patch tries to "fix" a problem which does not exist for such small
> >     numbers of files. The potential problems it may introduce are however
> >     now inflicted on many users - due to the small default. On a platform,
> >     which is already shaky enough (Windows).
> > 
> > 
> > I understand your concern about Windows stability. Do you have any
> > concrete concerns about potential problems this patch may introduce? We
> > take care to limit the total number of open files. And the context
> > managers ensure files are closed before locks are released. Exceptions
> > in threads will get raised on the main thread. I'm not spotting an
> > obvious weakness in this approach (other than potentially slowdown due
> > to thread startup/shutdown overhead and more I/O contention - but I
> > think it's OK to let the kernel sort these things out).
> 
> I don't have any known specifig bugs or specific questions myself at the
> moment. If I would know a specifig bug, I would tell you.
> 
> But, for example, I think there was a remark by Yuya on Jan 12 ("Because
> threads aren't joined, delayed closing can exceed the "with" scope. It
> would cause race condition and too early lock releasing.") which I
> haven't seen answered. Perhaps I missed a message though.

This one is addressed by the accepted patch. But I tend to agree with you,
file is hard on Windows, at least for me.


More information about the Mercurial-devel mailing list