RE: svn commit: r1685985 - in /subversion/branches/fsx-1.10/subversion: include/private/svn_mutex.h libsvn_fs_x/batch_fsync.c libsvn_fs_x/batch_fsync.h libsvn_fs_x/fs.c libsvn_subr/mutex.c tests/libsvn_fs_x/fs-x-pack-test.c
From: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 17 Jun 2015 15:46:09 +0200
> -----Original Message-----
Would it be possible to implement this on filehandles on Windows, instead of just on filenames.
Reopening a file that has just been closed is typically not fast on Windows, as virusscanners and file indexers are often fighting to use the same files. The next open operation then sometimes has to wait (when using OPLOCKS) or has to be retried (when the other process opens the file in a way that concurrent writes are denied).
All of this can be avoided by just flushing the filehandle we already had when the file was open for writing. By closing and re-opening we are doing a lot of unneeded work and add a lot of potential race conditions.
This is an archived mail posted to the Subversion Dev mailing list.