Commit 3610f045 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 51e4b340
...@@ -203,6 +203,10 @@ func (fs *FileStorage) Load(xid zodb.Xid) (data []byte, tid zodb.Tid, err error) ...@@ -203,6 +203,10 @@ func (fs *FileStorage) Load(xid zodb.Xid) (data []byte, tid zodb.Tid, err error)
return nil, zodb.Tid(0), &ErrXidLoad{xid, &zodb.ErrXidMissing{Xid: xid}} return nil, zodb.Tid(0), &ErrXidLoad{xid, &zodb.ErrXidMissing{Xid: xid}}
} }
// even if we will scan back via backpointers, the tid returned should
// be of first-found transaction
tid = dh.Tid
// scan via backpointers // scan via backpointers
for dh.DataLen == 0 { for dh.DataLen == 0 {
var xxx [8]byte // XXX escapes ? var xxx [8]byte // XXX escapes ?
...@@ -227,7 +231,7 @@ func (fs *FileStorage) Load(xid zodb.Xid) (data []byte, tid zodb.Tid, err error) ...@@ -227,7 +231,7 @@ func (fs *FileStorage) Load(xid zodb.Xid) (data []byte, tid zodb.Tid, err error)
return nil, zodb.Tid(0), &ErrXidLoad{xid, err} return nil, zodb.Tid(0), &ErrXidLoad{xid, err}
} }
return data, dh.Tid, nil return data, tid, nil
} }
func (fs *FileStorage) Close() error { func (fs *FileStorage) Close() error {
......
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