Commit 7991e191 authored by Jim Fulton's avatar Jim Fulton

loadSerial wasn't protected by a lock.

parent e03aa4de
......@@ -184,7 +184,7 @@
# may have a back pointer to a version record or to a non-version
# record.
#
__version__='$Revision: 1.37 $'[11:-2]
__version__='$Revision: 1.38 $'[11:-2]
import struct, time, os, bpthread, string, base64, sys
from struct import pack, unpack
......@@ -585,6 +585,8 @@ class FileStorage(BaseStorage.BaseStorage):
finally: self._lock_release()
def loadSerial(self, oid, serial):
self._lock_acquire()
try:
_index=self._index
file=self._file
seek=file.seek
......@@ -611,6 +613,7 @@ class FileStorage(BaseStorage.BaseStorage):
# We got a backpointer, probably from a commit.
pnv=read(8)
return _loadBack(file, oid, pnv)[0]
finally: self._lock_release()
def modifiedInVersion(self, oid):
self._lock_acquire()
......
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