Commit 88832824 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 cb10cd86
......@@ -49,6 +49,12 @@ BTrees
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
record iterator to iterate over all current revisions of data
pickles in the storage.
......@@ -81,6 +87,14 @@ which objects did it reference? what kind of object was it?).
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?
============================
Release date: DD-MMM-2005
......
......@@ -23,7 +23,7 @@ import os
import sys
import time
import logging
from types import StringType, DictType
from types import StringType
from struct import pack, unpack
# Not all platforms have fsync
......@@ -371,13 +371,12 @@ class FileStorage(BaseStorage.BaseStorage,
return None
pos = long(pos)
if (
isinstance(index, DictType) or
(isinstance(index, fsIndex) and isinstance(index._data, DictType))
):
if (isinstance(index, dict) or
(isinstance(index, fsIndex) and
isinstance(index._data, dict))):
# Convert dictionary indexes to fsIndexes *or* convert fsIndexes
# which have a DictType `_data` attribute to a new fsIndex (newer
# fsIndexes have an OOBTree as `_data`)
# which have a dict `_data` attribute to a new fsIndex (newer
# fsIndexes have an OOBTree as `_data`).
newindex = fsIndex()
newindex.update(index)
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