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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Leo Le Bouter
slapos
Commits
68e46df1
Commit
68e46df1
authored
Feb 06, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
version up: ZODB 4.4.5, BTrees 4.4.1
parent
5f0f8d53
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
72 deletions
+2
-72
component/egg-patch/ZODB4-pr136.patch
component/egg-patch/ZODB4-pr136.patch
+0
-63
software/neoppod/software-common.cfg
software/neoppod/software-common.cfg
+2
-6
software/neoppod/software-zodb5.cfg
software/neoppod/software-zodb5.cfg
+0
-3
No files found.
component/egg-patch/ZODB4-pr136.patch
deleted
100644 → 0
View file @
5f0f8d53
From 6e2dd54b4988a40766db557906b1d544916a6859 Mon Sep 17 00:00:00 2001
From: Julien Muchembled <jm@nexedi.com>
Date: Fri, 13 Jan 2017 23:45:54 +0100
Subject: [PATCH] Fix deadlock with storages that "sync" on a new transaction
This backports a change from commit 227953b977a9e195c4ce9bbb9acd9c5ee60c333a.
NEO, as well as ZEO+server_sync (ERP5 backports this feature with a
monkey-patch), pings the server (primary master node in the case of NEO) on
new transactions. However, this round-trip is actually performed by the thread
that also does tasks requiring to lock the DB, like processing of invalidations.
Since transaction 1.6.1 (more precisely commit e581a120a6), IStorage.sync()
is called indirectly by DB.open() when a transaction has already begun,
and the DB must not be locked when this happens.
---
src/ZODB/DB.py | 9 +++------
src/ZODB/tests/testDB.py | 2 +-
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/ZODB/DB.py b/src/ZODB/DB.py
index 95f1ab4..ffd10e9 100644
--- a/src/ZODB/DB.py
+++ b/src/ZODB/DB.py
@@ -753,19 +753,16 @@
def open(self, transaction_manager=None, at=None, before=None):
result = self.pool.pop()
assert result is not None
- # open the connection.
- result.open(transaction_manager)
-
# A good time to do some cache cleanup.
# (note we already have the lock)
self.pool.availableGC()
self.historical_pool.availableGC()
-
- return result
-
finally:
self._r()
+ result.open(transaction_manager)
+ return result
+
def connectionDebugInfo(self):
result = []
t = time.time()
diff --git a/src/ZODB/tests/testDB.py b/src/ZODB/tests/testDB.py
index 59b6ccf..e6286a4 100644
--- a/src/ZODB/tests/testDB.py
+++ b/src/ZODB/tests/testDB.py
@@ -151,7 +151,7 @@
def connectionDebugInfo():
>>> before
[None, '\x03zY\xd8\xc0m9\xdd', None]
>>> opened
- ['2008-12-04T20:40:44Z (1.40s)', '2008-12-04T20:40:45Z (0.30s)', None]
+ ['2008-12-04T20:40:44Z (1.30s)', '2008-12-04T20:40:46Z (0.10s)', None]
>>> infos
['test info (2)', ' (0)', ' (0)']
--
2.10.2.2.g19ca937.dirty
software/neoppod/software-common.cfg
View file @
68e46df1
...
...
@@ -47,10 +47,6 @@ eggs = neoppod[admin, ctl, master, storage-mysqldb]
ZODB
zope.testing
zodbtools
patch-binary = ${patch:location}/bin/patch
ZODB-patch-options = -p1
ZODB-patches =
${:_profile_base_location_}/../../component/egg-patch/ZODB4-pr136.patch
[slapos-deps-eggs]
recipe = zc.recipe.egg
...
...
@@ -109,8 +105,8 @@ url = ${:_profile_base_location_}/my.cnf.in
md5sum = cfdd59d42ae540563a964ccaf8fec232
[versions]
BTrees = 4.
3
.1
ZODB = 4.4.
4+SlapOSPatched001
BTrees = 4.
4
.1
ZODB = 4.4.
5
persistent = 4.2.2
slapos.recipe.template = 2.10
transaction = 1.7.0
...
...
software/neoppod/software-zodb5.cfg
View file @
68e46df1
[buildout]
extends = software.cfg
[neoppod]
ZODB-patches =
[versions]
ZODB = 5.1.1
transaction = 2.0.3
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