Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
Levin Zimmermann
neoppod
Commits
7e456329
Commit
7e456329
authored
Nov 14, 2018
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More RTMIN+2 (log) information for clients and connections
parent
d66b4f24
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
neo/client/app.py
neo/client/app.py
+2
-0
neo/client/transactions.py
neo/client/transactions.py
+10
-0
neo/lib/event.py
neo/lib/event.py
+5
-0
No files found.
neo/client/app.py
View file @
7e456329
...
@@ -123,6 +123,8 @@ class Application(ThreadedApplication):
...
@@ -123,6 +123,8 @@ class Application(ThreadedApplication):
def
log
(
self
):
def
log
(
self
):
super
(
Application
,
self
).
log
()
super
(
Application
,
self
).
log
()
logging
.
info
(
"%r"
,
self
.
_cache
)
logging
.
info
(
"%r"
,
self
.
_cache
)
for
txn_context
in
self
.
_txn_container
.
itervalues
():
logging
.
info
(
"%r"
,
txn_context
)
@
property
@
property
def
txn_contexts
(
self
):
def
txn_contexts
(
self
):
...
...
neo/client/transactions.py
View file @
7e456329
...
@@ -19,6 +19,7 @@ from ZODB.POSException import StorageTransactionError
...
@@ -19,6 +19,7 @@ from ZODB.POSException import StorageTransactionError
from
neo.lib.connection
import
ConnectionClosed
from
neo.lib.connection
import
ConnectionClosed
from
neo.lib.locking
import
SimpleQueue
from
neo.lib.locking
import
SimpleQueue
from
neo.lib.protocol
import
Packets
from
neo.lib.protocol
import
Packets
from
neo.lib.util
import
dump
from
.exception
import
NEOStorageError
from
.exception
import
NEOStorageError
@
apply
@
apply
...
@@ -52,6 +53,15 @@ class Transaction(object):
...
@@ -52,6 +53,15 @@ class Transaction(object):
# involved storage nodes; connection is None is connection was lost
# involved storage nodes; connection is None is connection was lost
self
.
conn_dict
=
{}
# {node_id: connection}
self
.
conn_dict
=
{}
# {node_id: connection}
def
__repr__
(
self
):
error
=
self
.
error
return
(
"<%s ttid=%s locking_tid=%s voted=%u"
" #queue=%s #writing=%s #written=%s%s>"
)
%
(
self
.
__class__
.
__name__
,
dump
(
self
.
ttid
),
dump
(
self
.
locking_tid
),
self
.
voted
,
len
(
self
.
queue
.
_queue
),
len
(
self
.
data_dict
),
len
(
self
.
cache_dict
),
' error=%r'
%
error
if
error
else
''
)
def
wakeup
(
self
,
conn
):
def
wakeup
(
self
,
conn
):
self
.
queue
.
put
((
conn
,
_WakeupPacket
,
{}))
self
.
queue
.
put
((
conn
,
_WakeupPacket
,
{}))
...
...
neo/lib/event.py
View file @
7e456329
...
@@ -314,6 +314,11 @@ class EpollEventManager(object):
...
@@ -314,6 +314,11 @@ class EpollEventManager(object):
for
fd
,
conn
in
self
.
connection_dict
.
items
():
for
fd
,
conn
in
self
.
connection_dict
.
items
():
logging
.
info
(
' %r: %r (pending=%r)'
,
fd
,
conn
,
logging
.
info
(
' %r: %r (pending=%r)'
,
fd
,
conn
,
conn
in
pending_set
)
conn
in
pending_set
)
for
request_dict
,
handler
in
conn
.
_handlers
.
_pending
:
handler
=
handler
.
__class__
.
__name__
for
msg_id
,
(
klass
,
kw
)
in
sorted
(
request_dict
.
items
()):
logging
.
info
(
' #0x%04x %s (%s)'
,
msg_id
,
klass
.
__name__
,
handler
)
# Default to EpollEventManager.
# Default to EpollEventManager.
...
...
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