[Zodb-checkins] CVS: ZODB3 - NEWS.txt:1.7

Tim Peters tim.one@comcast.net
Wed, 11 Sep 2002 15:05:47 -0400


Update of /cvs-repository/ZODB3
In directory cvs.zope.org:/tmp/cvs-serv23267

Modified Files:
	NEWS.txt 
Log Message:
Beefed up the section on BTree fixes.


=== ZODB3/NEWS.txt 1.6 => 1.7 ===
--- ZODB3/NEWS.txt:1.6	Wed Sep 11 04:22:04 2002
+++ ZODB3/NEWS.txt	Wed Sep 11 15:05:47 2002
@@ -75,12 +75,39 @@
 
 BTrees no longer ignore exceptions raised when two keys are compared.
 
-Tim Peters fixed many small bugs in the BTrees code.  These included
-many fixes for range searches, including the "range search bug:" If
-the smallest key S in a bucket in a BTree is deleted, doing a range
-search on the BTree with S on the high end may claim that the range is
-empty even when it's not.  XXX Tim really needs to provide a short
-summary, since I've got no idea what the highlights are.
+Tim Peters fixed several endcase bugs in the BTrees code.  Most
+importantly, after a mix of inserts and deletes in a BTree or TreeSet, it
+was possible (but unlikely) for the internal state of the object to become
+inconsistent.  Symptoms then varied; most often this manifested as a
+mysterious failure to find a key that you knew was present, or that
+tree.keys() would yield an object that disgreed with the tree about
+how many keys there were.
+
+If you suspect such a problem, BTrees and TreeSets now support a ._check()
+method, which does a thorough job of examining the internal tree pointers
+for consistency.  It raises AssertionError if it finds any problems, else
+returns None.  If ._check() raises an exception, the object is damaged,
+and rebuilding the object is the best solution.  All known ways for a
+BTree or TreeSet object to become internally inconsistent have been
+repaired.
+
+Other fixes include:
+
+- Many fixes for range search endcases, including the "range search bug:"
+  If the smallest key S in a bucket in a BTree was deleted, doing a range
+  search on the BTree with S on the high end could claim that the range
+  was empty even when it wasn't.
+
+- Zope Collector #419:  repaired off-by-1 errors and IndexErrors when
+  slicing BTree-based data structures.  For example, 
+  an_IIBTree.items()[0:0] had length 1 (should be empty) if the tree
+  wasn't empty.
+
+- The BTree module functions weightedIntersection() and weightedUnion()
+  now treat negative weights as documented.  It's hard to explain what
+  their effects were before this fix, as the sign bits were getting
+  confused with an internal distinction between whether the result
+  should be a set or a mapping.
 
 ZEO
 ---
@@ -117,7 +144,7 @@
 
 If an exception occurs inside an _p_deactivate() method, a traceback
 is printed on stderr.  Previous versions of ZODB silently cleared the
-exception. 
+exception.
 
 ExtensionClass and ZODB now work correctly with a Python debug build.