Commit a8e99d0d authored by Jeremy Hylton's avatar Jeremy Hylton

Split assert into two parts, checking for None in second part.

The comment indicated that end could be None, and I've fleshed out the
comment with more detail.
parent b5e4b90d
...@@ -13,14 +13,14 @@ ...@@ -13,14 +13,14 @@
############################################################################## ##############################################################################
"""Database connection support """Database connection support
$Id: Connection.py,v 1.106 2003/12/27 13:54:04 sidnei Exp $""" $Id: Connection.py,v 1.107 2003/12/31 16:27:29 jeremy Exp $"""
import logging import logging
import sys import sys
import threading import threading
from time import time from time import time
from types import ClassType from types import ClassType
from utils import U64 from utils import u64
_marker = object() _marker = object()
...@@ -518,10 +518,13 @@ class Connection(ExportImport, object): ...@@ -518,10 +518,13 @@ class Connection(ExportImport, object):
# txn_time. It must be current at txn_time, but could have # txn_time. It must be current at txn_time, but could have
# been modified at txn_time. # been modified at txn_time.
# It's possible that end is None, if, e.g., the most recent # It's possible that end is None. The _txn_time is set by an
# invalidation was for version data. # invalidation for one specific object, but it used for the
assert start < self._txn_time <= end, \ # load time for all objects. If an object hasn't been
(U64(start), U64(self._txn_time), U64(end)) # modified since _txn_time, it's end tid will be None.
assert start < self._txn_time, (u64(start), u64(self._txn_time))
assert end is None or self._txn_time <= end, \
(u64(self._txn_time), u64(end))
self._noncurrent[obj._p_oid] = True self._noncurrent[obj._p_oid] = True
self._reader.setGhostState(obj, data) self._reader.setGhostState(obj, data)
obj._p_serial = start obj._p_serial = start
......
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