Commit d06e32a8 authored by Jim Fulton's avatar Jim Fulton Committed by GitHub

Merge pull request #47 from NextThought/trace-before

Fix tracing of loadBefore with empty tids on Py3.
parents edf0bf07 121a551e
Changelog Changelog
========= =========
4.2.2 (unreleased)
------------------
- Fix ZEO cache tracing on Python 3.
4.2.1 (2016-06-30) 4.2.1 (2016-06-30)
------------------ ------------------
......
...@@ -557,7 +557,7 @@ class ClientCache(object): ...@@ -557,7 +557,7 @@ class ClientCache(object):
if result: if result:
return result[0], result[1], None return result[0], result[1], None
else: else:
self._trace(0x24, oid, "", before_tid) self._trace(0x24, oid, b"", before_tid)
return result return result
items = noncurrent_for_oid.items(None, u64(before_tid)-1) items = noncurrent_for_oid.items(None, u64(before_tid)-1)
...@@ -566,7 +566,7 @@ class ClientCache(object): ...@@ -566,7 +566,7 @@ class ClientCache(object):
if result: if result:
return result[0], result[1], None return result[0], result[1], None
else: else:
self._trace(0x24, oid, "", before_tid) self._trace(0x24, oid, b"", before_tid)
return result return result
tid, ofs = items[-1] tid, ofs = items[-1]
...@@ -593,11 +593,11 @@ class ClientCache(object): ...@@ -593,11 +593,11 @@ class ClientCache(object):
if result: if result:
return result[0], result[1], None return result[0], result[1], None
else: else:
self._trace(0x24, oid, "", before_tid) self._trace(0x24, oid, b"", before_tid)
return result return result
self._n_accesses += 1 self._n_accesses += 1
self._trace(0x26, oid, "", saved_tid) self._trace(0x26, oid, b"", saved_tid)
return data, saved_tid, end_tid return data, saved_tid, end_tid
## ##
......
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