Commit 241ae20e authored by Tim Peters's avatar Tim Peters

_restore_index(): No need to use types.DictType anymore.

Added news blurbs about fsIndex improvements, and about that
.index files written by 3.4 won't be readable by earlier ZODBs.
parent 03ea9cc3
...@@ -49,6 +49,12 @@ BTrees ...@@ -49,6 +49,12 @@ BTrees
FileStorage FileStorage
----------- -----------
- The main part of a ``Data.fs.index`` index file now uses an OOBTree
instead of a Python dictionary. A consequence is that ``.index`` files
written by this version of ZODB cannot be read by earlier versions of
ZODB. Older ``.index`` files can be read by this version of ZODB, and
are automatically converted to use the new scheme.
- Addded a record iteration protocol to FileStorage. You can use the - Addded a record iteration protocol to FileStorage. You can use the
record iterator to iterate over all current revisions of data record iterator to iterate over all current revisions of data
pickles in the storage. pickles in the storage.
...@@ -81,6 +87,14 @@ which objects did it reference? what kind of object was it?). ...@@ -81,6 +87,14 @@ which objects did it reference? what kind of object was it?).
ZODB/test/testfsoids.py is a tutorial doctest. ZODB/test/testfsoids.py is a tutorial doctest.
fsIndex
-------
Efficient, general implementations of ``minKey()`` and ``maxKey()`` methods
were added. ``fsIndex`` is a special hybrid kind of BTree used to implement
FileStorage indices. Thanks to Chris McDonough for code and tests.
What's new in ZODB3 3.3.1a2? What's new in ZODB3 3.3.1a2?
============================ ============================
Release date: DD-MMM-2005 Release date: DD-MMM-2005
......
...@@ -23,7 +23,7 @@ import os ...@@ -23,7 +23,7 @@ import os
import sys import sys
import time import time
import logging import logging
from types import StringType, DictType from types import StringType
from struct import pack, unpack from struct import pack, unpack
# Not all platforms have fsync # Not all platforms have fsync
...@@ -371,13 +371,12 @@ class FileStorage(BaseStorage.BaseStorage, ...@@ -371,13 +371,12 @@ class FileStorage(BaseStorage.BaseStorage,
return None return None
pos = long(pos) pos = long(pos)
if ( if (isinstance(index, dict) or
isinstance(index, DictType) or (isinstance(index, fsIndex) and
(isinstance(index, fsIndex) and isinstance(index._data, DictType)) isinstance(index._data, dict))):
):
# Convert dictionary indexes to fsIndexes *or* convert fsIndexes # Convert dictionary indexes to fsIndexes *or* convert fsIndexes
# which have a DictType `_data` attribute to a new fsIndex (newer # which have a dict `_data` attribute to a new fsIndex (newer
# fsIndexes have an OOBTree as `_data`) # fsIndexes have an OOBTree as `_data`).
newindex = fsIndex() newindex = fsIndex()
newindex.update(index) newindex.update(index)
index = newindex index = newindex
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment