/[Apache-SVN]
ViewVC logotype

Revision 1665894


Jump to revision: Previous Next
Author: stefan2
Date: Wed Mar 11 15:03:17 2015 UTC (9 years, 8 months ago)
Changed paths: 5
Log Message:
Fix the noderev relatedness check for FSFS and FSX when both noderevs / IDs
belong to different transactions.  Provide a test case for it.

Due to a misread of the 1.8.x logic, the new code in 1.9 reported noderevs
from different txns as "unrelated".  The actual problem that exists in FSFS
is that node-IDs that just got created (as added w/o history) in a txn have
only a txn-local ID.  Hence, they may clash between txns.  OTOH, uncommitted
new nodes from different txns cannot be related.  So, the relation check
can be implemented for all possible cases in FSFS but requires extra logic.

BDB did the right thing from the start.  FSX had code added to mimic FSFS'
restriction and that code can simply be removed.

Found by: julianfoad

* subversion/libsvn_fs_fs/id.c
  (svn_fs_fs__id_check_related): Use a more obvious check for the
                                 "same tmp node-ID but different txn" case.

* subversion/libsvn_fs_fs/tree.c
  (fs_node_relation): Re-implement the logic for nodes from different txns.

* subversion/libsvn_fs_x/fs_id.c
  (id_compare): Remove the "different txns implies unrelated nodes" block.

* subversion/libsvn_fs_x/tree.c
  (x_node_relation): Same.

* subversion/tests/libsvn_fs/fs-test.c
  (check_txn_related): New test, inspired by check_txn_related.
  (test_funcs): Register the new test.

Changed paths

Path Details
Directorysubversion/trunk/subversion/libsvn_fs_fs/id.c modified , text changed
Directorysubversion/trunk/subversion/libsvn_fs_fs/tree.c modified , text changed
Directorysubversion/trunk/subversion/libsvn_fs_x/fs_id.c modified , text changed
Directorysubversion/trunk/subversion/libsvn_fs_x/tree.c modified , text changed
Directorysubversion/trunk/subversion/tests/libsvn_fs/fs-test.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26