You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2016/01/21 20:54:45 UTC
svn commit: r1726078 -
/subversion/branches/parallel-put/subversion/libsvn_fs_fs/transaction.c
Author: stefan2
Date: Thu Jan 21 19:54:45 2016
New Revision: 1726078
URL: http://svn.apache.org/viewvc?rev=1726078&view=rev
Log:
On the parallel-put branch:
Fix another synchronization / locking issue.
* subversion/libsvn_fs_fs/transaction.c
(rep_write_contents_close): Setting the uniquifier is a modifying
operation and must therefore be mutex'ed.
Modified:
subversion/branches/parallel-put/subversion/libsvn_fs_fs/transaction.c
Modified: subversion/branches/parallel-put/subversion/libsvn_fs_fs/transaction.c
URL: http://svn.apache.org/viewvc/subversion/branches/parallel-put/subversion/libsvn_fs_fs/transaction.c?rev=1726078&r1=1726077&r2=1726078&view=diff
==============================================================================
--- subversion/branches/parallel-put/subversion/libsvn_fs_fs/transaction.c (original)
+++ subversion/branches/parallel-put/subversion/libsvn_fs_fs/transaction.c Thu Jan 21 19:54:45 2016
@@ -2586,7 +2586,6 @@ rep_write_contents_close(void *baton)
/* Fill in the rest of the representation field. */
rep->expanded_size = b->expanded_size;
rep->txn_id = *txn_id;
- SVN_ERR(set_uniquifier(b->fs, rep, b->scratch_pool));
rep->revision = SVN_INVALID_REVNUM;
/* Finalize the checksum. */
@@ -2597,6 +2596,10 @@ rep_write_contents_close(void *baton)
if (ffd->concurrent_txns)
SVN_ERR(rep_write_open_file(b));
+ /* This modifies shared txn data. Therefore, we need the lock on this
+ * txn and can't do it earlier. */
+ SVN_ERR(set_uniquifier(b->fs, rep, b->scratch_pool));
+
/* Check and see if we already have a representation somewhere that's
identical to the one we just wrote out. */
SVN_ERR(get_shared_rep(&old_rep, b->fs, rep, NULL, b->result_pool,