subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1332062 - in /subversion/trunk: notes/api-errata/1.8/ notes/api-errata/1.8/fs001.txt subversion/include/svn_fs.h
Date Mon, 30 Apr 2012 06:13:36 GMT
Author: gstein
Date: Mon Apr 30 06:13:35 2012
New Revision: 1332062

Fix the docstring for svn_fs_commit_txn().

Approach reviewed by: danielsh

* subversion/include/svn_fs.h:
  (svn_fs_commit_txn): fix docstring to note where CONFLICT_PATH is
    actually allocated.

* notes/api-errata/1.8: new directory

* notes/api-errata/1.8/fs001.txt: we are nominally changing the
    semantics of svn_fs_commit_txn, or at least the possible
    expectation that callers have. they should review their usage.


Added: subversion/trunk/notes/api-errata/1.8/fs001.txt
--- subversion/trunk/notes/api-errata/1.8/fs001.txt (added)
+++ subversion/trunk/notes/api-errata/1.8/fs001.txt Mon Apr 30 06:13:35 2012
@@ -0,0 +1,35 @@
+Root Cause of Errata: implementation/docstring mismatch
+ Library(s) Affected: libsvn_fs_fs, libsvn_fs_base, libsvn_repos
+Function(s) Affected: svn_fs_commit_txn, svn_repos_fs_commit_txn
+     New Behavior in: n/a
+      Related Issues: n/a
+== Details ==
+The docstring for svn_fs_commit_txn() stated that the returned
+CONFLICT_PATH value was allocated in the transaction's pool. However,
+the two implementations (BDB and FSFS) allocate the path in the POOL
+parameter passed to the function.
+This behavior is directly propagated to the svn_repos_fs_commit_txn
+function and its CONFLICT_PATH and POOL parameters.
+For the 1.8 release, the docstring has been updated to match the
+implementation: the path is allocated in the provided pool.
+== Impact on API Users ==
+If an API user expected the path to live in the transaction pool, then
+it may run into problems depending upon the lifetime of the provided
+pool, relative to the transaction pool. A number of callers abort the
+transaction when such a conflict occurs; if the implementation had
+actually placed the path into the transaction pool, it would become
+invalid when the transaction is aborted and likely cause problems for
+any caller truly expecting the path to live in the transaction pool.
+All API users should review their use of the CONFLICT_PATH parameter
+and the necessary lifetime.

Modified: subversion/trunk/subversion/include/svn_fs.h
--- subversion/trunk/subversion/include/svn_fs.h (original)
+++ subversion/trunk/subversion/include/svn_fs.h Mon Apr 30 06:13:35 2012
@@ -865,7 +865,7 @@ svn_fs_begin_txn(svn_fs_txn_t **txn_p,
  * If @a conflict_p is non-zero, use it to provide details on any
  * conflicts encountered merging @a txn with the most recent committed
  * revisions.  If a conflict occurs, set @a *conflict_p to the path of
- * the conflict in @a txn, with the same lifetime as @a txn;
+ * the conflict in @a txn, allocated within @a pool;
  * otherwise, set @a *conflict_p to NULL.
  * If the commit succeeds, @a txn is invalid.

View raw message