Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Kirill Smelkov
ZEO
Commits
6a73562c
Commit
6a73562c
authored
Mar 30, 2022
by
dieter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #156
parent
ca4bdf88
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
7 deletions
+30
-7
CHANGES.rst
CHANGES.rst
+17
-1
src/ZEO/StorageServer.py
src/ZEO/StorageServer.py
+10
-5
src/ZEO/asyncio/server.py
src/ZEO/asyncio/server.py
+3
-1
No files found.
CHANGES.rst
View file @
6a73562c
...
...
@@ -4,11 +4,27 @@ Changelog
5.3.1 (unreleased)
------------------
- Add ``ConflictError`` to the list of unlogged server exceptions
(the client/its application should determine whether it wants
them logged).
Prevent ``no current transaction: tpc_abort()`` server log entries.
The storage API allows ``tpc_abort`` to be called with an
invalid transaction (the call should be ignored in this case)
and the server's ``tpc_vote`` relies on this.
Change the server's log message label for request exceptions
from ``Bad request ...`` to ``... raised exception:``,
hinting towards a server rather than client problem.
See `issue 156 <https://github.com/zopefoundation/ZEO/issues/156>`_.
5.3.0 (2022-03-24)
------------------
- Remove tests for the `
asyncio/mtacceptor
` module, it appears unused
- Remove tests for the `
`asyncio/mtacceptor`
` module, it appears unused
and presents a maintenance burden. The module will be removed in
ZEO version 6.
...
...
src/ZEO/StorageServer.py
View file @
6a73562c
...
...
@@ -182,6 +182,9 @@ class ZEOStorage(object):
raise
ReadOnlyError
()
if
self
.
transaction
is
None
:
caller
=
sys
.
_getframe
().
f_back
.
f_code
.
co_name
# ``tpc_abort`` is allowed to be called with invalid transaction
# ``vote`` relies on this
if
caller
!=
"tpc_abort"
:
self
.
log
(
"no current transaction: %s()"
%
caller
,
level
=
logging
.
WARNING
)
if
exc
is
not
None
:
...
...
@@ -190,6 +193,8 @@ class ZEOStorage(object):
return
0
if
self
.
transaction
.
id
!=
tid
:
caller
=
sys
.
_getframe
().
f_back
.
f_code
.
co_name
# ``tpc_abort`` is allowed to be called with invalid transaction
if
caller
!=
"tpc_abort"
:
self
.
log
(
"%s(%s) invalid; current transaction = %s"
%
(
caller
,
repr
(
tid
),
repr
(
self
.
transaction
.
id
)),
logging
.
WARNING
)
...
...
src/ZEO/asyncio/server.py
View file @
6a73562c
...
...
@@ -24,6 +24,7 @@ class ServerProtocol(base.Protocol):
unlogged_exception_types
=
(
ZODB
.
POSException
.
POSKeyError
,
ZODB
.
POSException
.
ConflictError
,
)
def
__init__
(
self
,
loop
,
addr
,
zeo_storage
,
msgpack
):
...
...
@@ -104,7 +105,8 @@ class ServerProtocol(base.Protocol):
except
Exception
as
exc
:
if
not
isinstance
(
exc
,
self
.
unlogged_exception_types
):
logger
.
exception
(
"Bad %srequest, %r"
,
'async '
if
async_
else
''
,
name
)
"%s`%r` raised exception:"
,
'async '
if
async_
else
''
,
name
)
if
async_
:
return
self
.
close
()
# No way to recover/cry for help
else
:
...
...
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