[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: svn commit: r1676535 -/subversion/trunk/subversion/tests/libsvn_subr/io-test.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Tue, 28 Apr 2015 18:54:51 +0200

Not on a pc, but this uses a Windows function that allows moving the file while it is still open. Normally when the file is reopened for moving by the os, virus scanners will lock the file until they are sure they are safe. In many cases involving our retry logic)

This moves this check to *after we are done* instead of between the flush and the rename. So the virus scanner still does its work but without delaying file installs.

The performance improvement is quite visible with virus scanners and on network shares where this avoids quite a but I client-server synchronization. (Even more when combined)

Bert

-----Original Message-----
From: "Ivan Zhakov" <ivan_at_visualsvn.com>
Sent: ‎28-‎4-‎2015 17:48
To: "Philip Martin" <philip.martin_at_wandisco.com>
Cc: "dev_at_subversion.apache.org" <dev_at_subversion.apache.org>; "brane_at_apache.org" <brane_at_apache.org>
Subject: Re: svn commit: r1676535 -/subversion/trunk/subversion/tests/libsvn_subr/io-test.c

On 28 April 2015 at 18:42, Philip Martin <philip.martin_at_wandisco.com> wrote:
> Ivan Zhakov <ivan_at_visualsvn.com> writes:
>
>>> What does "can be installed using Windows checkouts much slower than
>>> Unix" mean?
>>>
>> I have no idea. This function was added in r1559758 [1] as preparation
>> to fix issue #4450 "Windows checkouts much slower then Unix" [2]. May
>> issue summary leaked to function docstring for some reason.
>
> I suspect it should be "can be installed using platform specific
> optimizations". Perhaps with something additional about closing the
> stream before installing.
>
> Is closing before installing just allowed or is it required? Before
> your commit I wrote a patch that closed the stream *after* calling
> svn_stream__install_stream and that was sufficient for the test to pass.
>
As far I understand from learning code close is *required* and should
be performed *before* calling svn_stream__install_stream(). Calling
svn_stream_close() after svn_stream__install_stream() works because OS
just flushes buffers to new location, but it's platform specific
behavior and data may be lost if power off between move and flush for
some reason.

-- 
Ivan Zhakov
Received on 2015-04-28 18:55:19 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.