Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jean-Paul Smets
slapos
Commits
f9fafb38
Commit
f9fafb38
authored
Feb 12, 2014
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patch ZODB3 (
https://mail.zope.org/pipermail/zodb-dev/2014-February/015182.html
)
parent
33755d40
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
0 deletions
+63
-0
component/egg-patch/ZODB3-3.10.5.patch
component/egg-patch/ZODB3-3.10.5.patch
+51
-0
stack/erp5/buildout.cfg
stack/erp5/buildout.cfg
+12
-0
No files found.
component/egg-patch/ZODB3-3.10.5.patch
0 → 100644
View file @
f9fafb38
#
https://mail.zope.org/pipermail/zodb-dev/2014-February/015182.html
diff --git a/src/ZODB/FileStorage/FileStorage.py b/src/ZODB/FileStorage/FileStorage.py
index d45cbbf..d662bf4 100644
--- a/src/ZODB/FileStorage/FileStorage.py
+++ b/src/ZODB/FileStorage/FileStorage.py
@@ -683,6 +683,7 @@
def tpc_vote(self, transaction):
# Hm, an error occurred writing out the data. Maybe the
# disk is full. We don't want any turd at the end.
self._file.truncate(self._pos)
+ self._files.flush()
raise
self._nextpos = self._pos + (tl + 8)
@@ -737,6 +738,7 @@
def _finish_finish(self, tid):
def _abort(self):
if self._nextpos:
self._file.truncate(self._pos)
+ self._files.flush()
self._nextpos=0
self._blob_tpc_abort()
@@ -1996,6 +1998,15 @@
def __init__(self, file_name):
self._out = []
self._cond = threading.Condition()
+ def flush(self):
+ """Empty read buffers.
+
+ This is required if they may contain data of rolled back transactions.
+ """
+ with self.write_lock():
+ for f in self._files:
+ f.flush()
+
@contextlib.contextmanager
def write_lock(self):
with self._cond:
# https://github.com/zopefoundation/ZODB/pull/15/files
diff -ur a/src/ZODB/FileStorage/FileStorage.py b/src/ZODB/FileStorage/FileStorage.py
--- a/src/ZODB/FileStorage/FileStorage.py
+++ b/src/ZODB/FileStorage/FileStorage.py
@@ -430,7 +430,7 @@
if h.tid == serial:
break
pos = h.prev
- if not pos:
+ if h.tid < serial or not pos:
raise POSKeyError(oid)
if h.plen:
return self._file.read(h.plen)
stack/erp5/buildout.cfg
View file @
f9fafb38
...
@@ -45,6 +45,7 @@ extends =
...
@@ -45,6 +45,7 @@ extends =
../../component/percona-toolkit/buildout.cfg
../../component/percona-toolkit/buildout.cfg
../../component/mariadb/buildout.cfg
../../component/mariadb/buildout.cfg
../../component/mysql-python/buildout.cfg
../../component/mysql-python/buildout.cfg
../../component/patch/buildout.cfg
../../component/pil-python/buildout.cfg
../../component/pil-python/buildout.cfg
../../component/pycrypto-python/buildout.cfg
../../component/pycrypto-python/buildout.cfg
../../component/pysvn-python/buildout.cfg
../../component/pysvn-python/buildout.cfg
...
@@ -106,6 +107,7 @@ parts =
...
@@ -106,6 +107,7 @@ parts =
wget
wget
# Buildoutish
# Buildoutish
patched-eggs
eggs
eggs
testrunner
testrunner
test_suite_runner
test_suite_runner
...
@@ -413,6 +415,13 @@ initialization =
...
@@ -413,6 +415,13 @@ initialization =
repository_id_list = list(reversed('''${erp5_repository_list:repository_id_list}'''.split()))
repository_id_list = list(reversed('''${erp5_repository_list:repository_id_list}'''.split()))
sys.path[0:0] = ['/'.join(['''${buildout:parts-directory}''', x]) for x in repository_id_list]
sys.path[0:0] = ['/'.join(['''${buildout:parts-directory}''', x]) for x in repository_id_list]
[patched-eggs]
recipe = minitage.recipe.egg
eggs = ZODB3
ZODB3-patches = ${:_profile_base_location_}/../../component/egg-patch/ZODB3-3.10.5.patch
ZODB3-patch-options = -p1
ZODB3-patch-binary = ${patch:location}/bin/patch
[eggs]
[eggs]
recipe = zc.recipe.egg
recipe = zc.recipe.egg
python = python2.7
python = python2.7
...
@@ -616,6 +625,9 @@ Products.CMFDefault = 2.2.3
...
@@ -616,6 +625,9 @@ Products.CMFDefault = 2.2.3
Products.CMFTopic = 2.2.1
Products.CMFTopic = 2.2.1
Products.CMFUid = 2.2.1
Products.CMFUid = 2.2.1
# patched eggs
ZODB3 = 3.10.5-ZMinitagePatched-ZODB33105
# newer version requires zope.traversing>=4.0.0a2.
# newer version requires zope.traversing>=4.0.0a2.
zope.app.appsetup = 3.16.0
zope.app.appsetup = 3.16.0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment