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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
2c17b942
Commit
2c17b942
authored
Apr 05, 2022
by
Jens Vagelpohl
Committed by
GitHub
Apr 05, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into py310
parents
b8671f0e
8d687bbd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
12 deletions
+34
-12
CHANGES.rst
CHANGES.rst
+16
-1
src/ZEO/StorageServer.py
src/ZEO/StorageServer.py
+10
-5
src/ZEO/asyncio/client.py
src/ZEO/asyncio/client.py
+1
-1
src/ZEO/asyncio/server.py
src/ZEO/asyncio/server.py
+7
-2
src/ZEO/tests/testZEO2.py
src/ZEO/tests/testZEO2.py
+0
-3
No files found.
CHANGES.rst
View file @
2c17b942
...
@@ -6,11 +6,26 @@ Changelog
...
@@ -6,11 +6,26 @@ Changelog
- Add support for Python 3.10.
- Add support for Python 3.10.
- 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)
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
and presents a maintenance burden. The module will be removed in
ZEO version 6.
ZEO version 6.
...
...
src/ZEO/StorageServer.py
View file @
2c17b942
...
@@ -182,17 +182,22 @@ class ZEOStorage(object):
...
@@ -182,17 +182,22 @@ class ZEOStorage(object):
raise
ReadOnlyError
()
raise
ReadOnlyError
()
if
self
.
transaction
is
None
:
if
self
.
transaction
is
None
:
caller
=
sys
.
_getframe
().
f_back
.
f_code
.
co_name
caller
=
sys
.
_getframe
().
f_back
.
f_code
.
co_name
self
.
log
(
"no current transaction: %s()"
%
caller
,
# ``tpc_abort`` is allowed to be called with invalid transaction
level
=
logging
.
WARNING
)
# ``vote`` relies on this
if
caller
!=
"tpc_abort"
:
self
.
log
(
"no current transaction: %s()"
%
caller
,
level
=
logging
.
WARNING
)
if
exc
is
not
None
:
if
exc
is
not
None
:
raise
exc
(
None
,
tid
)
raise
exc
(
None
,
tid
)
else
:
else
:
return
0
return
0
if
self
.
transaction
.
id
!=
tid
:
if
self
.
transaction
.
id
!=
tid
:
caller
=
sys
.
_getframe
().
f_back
.
f_code
.
co_name
caller
=
sys
.
_getframe
().
f_back
.
f_code
.
co_name
self
.
log
(
"%s(%s) invalid; current transaction = %s"
%
# ``tpc_abort`` is allowed to be called with invalid transaction
(
caller
,
repr
(
tid
),
repr
(
self
.
transaction
.
id
)),
if
caller
!=
"tpc_abort"
:
logging
.
WARNING
)
self
.
log
(
"%s(%s) invalid; current transaction = %s"
%
(
caller
,
repr
(
tid
),
repr
(
self
.
transaction
.
id
)),
logging
.
WARNING
)
if
exc
is
not
None
:
if
exc
is
not
None
:
raise
exc
(
self
.
transaction
.
id
,
tid
)
raise
exc
(
self
.
transaction
.
id
,
tid
)
else
:
else
:
...
...
src/ZEO/asyncio/client.py
View file @
2c17b942
...
@@ -131,7 +131,7 @@ class Protocol(base.Protocol):
...
@@ -131,7 +131,7 @@ class Protocol(base.Protocol):
logger
.
info
(
"Connection to %r cancelled"
,
self
.
addr
)
logger
.
info
(
"Connection to %r cancelled"
,
self
.
addr
)
elif
future
.
exception
()
is
not
None
:
elif
future
.
exception
()
is
not
None
:
logger
.
info
(
"Connection to %r failed, %s"
,
logger
.
info
(
"Connection to %r failed, %s"
,
(
self
.
addr
,
future
.
exception
()
))
self
.
addr
,
future
.
exception
(
))
else
:
return
else
:
return
# keep trying
# keep trying
if
not
self
.
closed
:
if
not
self
.
closed
:
...
...
src/ZEO/asyncio/server.py
View file @
2c17b942
...
@@ -24,6 +24,8 @@ class ServerProtocol(base.Protocol):
...
@@ -24,6 +24,8 @@ class ServerProtocol(base.Protocol):
unlogged_exception_types
=
(
unlogged_exception_types
=
(
ZODB
.
POSException
.
POSKeyError
,
ZODB
.
POSException
.
POSKeyError
,
ZODB
.
POSException
.
ConflictError
,
ZODB
.
POSException
.
ReadConflictError
,
)
)
def
__init__
(
self
,
loop
,
addr
,
zeo_storage
,
msgpack
):
def
__init__
(
self
,
loop
,
addr
,
zeo_storage
,
msgpack
):
...
@@ -104,7 +106,8 @@ class ServerProtocol(base.Protocol):
...
@@ -104,7 +106,8 @@ class ServerProtocol(base.Protocol):
except
Exception
as
exc
:
except
Exception
as
exc
:
if
not
isinstance
(
exc
,
self
.
unlogged_exception_types
):
if
not
isinstance
(
exc
,
self
.
unlogged_exception_types
):
logger
.
exception
(
logger
.
exception
(
"Bad %srequest, %r"
,
'async '
if
async_
else
''
,
name
)
"%s`%r` raised exception:"
,
'async '
if
async_
else
''
,
name
)
if
async_
:
if
async_
:
return
self
.
close
()
# No way to recover/cry for help
return
self
.
close
()
# No way to recover/cry for help
else
:
else
:
...
@@ -163,6 +166,7 @@ class Delay(object):
...
@@ -163,6 +166,7 @@ class Delay(object):
"""
"""
msgid
=
protocol
=
sent
=
None
msgid
=
protocol
=
sent
=
None
unlogged_exception_types
=
ServerProtocol
.
unlogged_exception_types
def
set_sender
(
self
,
msgid
,
protocol
):
def
set_sender
(
self
,
msgid
,
protocol
):
self
.
msgid
=
msgid
self
.
msgid
=
msgid
...
@@ -175,7 +179,8 @@ class Delay(object):
...
@@ -175,7 +179,8 @@ class Delay(object):
def
error
(
self
,
exc_info
):
def
error
(
self
,
exc_info
):
self
.
sent
=
'error'
self
.
sent
=
'error'
logger
.
error
(
"Error raised in delayed method"
,
exc_info
=
exc_info
)
if
exc_info
[
0
]
not
in
self
.
unlogged_exception_types
:
logger
.
error
(
"Error raised in delayed method"
,
exc_info
=
exc_info
)
if
self
.
protocol
:
if
self
.
protocol
:
self
.
protocol
.
send_error
(
self
.
msgid
,
exc_info
[
1
])
self
.
protocol
.
send_error
(
self
.
msgid
,
exc_info
[
1
])
...
...
src/ZEO/tests/testZEO2.py
View file @
2c17b942
...
@@ -92,9 +92,6 @@ client will be restarted. It will get a conflict error, that is
...
@@ -92,9 +92,6 @@ client will be restarted. It will get a conflict error, that is
raised to the client:
raised to the client:
>>> zs1.tpc_abort('0') # doctest: +ELLIPSIS
>>> zs1.tpc_abort('0') # doctest: +ELLIPSIS
Error raised in delayed method
Traceback (most recent call last):
...ConflictError: ...
error 1 database conflict error ...
error 1 database conflict error ...
The transaction is aborted by the server:
The transaction is aborted by the server:
...
...
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