Author: stefan2
Date: Sun Aug 24 23:50:38 2014
New Revision: 1620241
URL: http://svn.apache.org/r1620241
Log:
On the revprop-caching-ng branch: Guarantee no lost updates on
revprop generation files.
* subversion/libsvn_fs_fs/revprops.c
(begin_revprop_change): Always close and re-open the file to make
sure we don't get stale OS file buffers.
Modified:
subversion/branches/revprop-caching-ng/subversion/libsvn_fs_fs/revprops.c
Modified:
subversion/branches/revprop-caching-ng/subversion/libsvn_fs_fs/revprops.c
URL:
http://svn.apache.org/viewvc/subversion/branches/revprop-caching-ng/subversion/libsvn_fs_fs/revprops.c?rev=1620241&r1=1620240&r2=1620241&view=diff
==============================================================================
--- subversion/branches/revprop-caching-ng/subversion/libsvn_fs_fs/revprops.c
(original)
+++ subversion/branches/revprop-caching-ng/subversion/libsvn_fs_fs/revprops.c
Sun Aug 24 23:50:38 2014
@@ -570,6 +570,10 @@ begin_revprop_change(apr_int64_t *genera
if (ffd->format < SVN_FS_FS__MIN_REVPROP_CACHING_FORMAT)
return SVN_NO_ERROR;
+ /* Close and re-open to make sure we read the latest data. */
+ SVN_ERR(close_revprop_generation_file(fs, scratch_pool));
+ SVN_ERR(ensure_revprop_generation(fs, FALSE, scratch_pool));
+
/* Set the revprop generation to an odd value to indicate
* that a write is in progress.
*/