Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
017f248d
Commit
017f248d
authored
Apr 25, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make NodeManager.remove stricter
parent
a60e36e8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
5 deletions
+2
-5
neo/lib/node.py
neo/lib/node.py
+0
-3
neo/master/handlers/administration.py
neo/master/handlers/administration.py
+2
-1
neo/master/handlers/client.py
neo/master/handlers/client.py
+0
-1
No files found.
neo/lib/node.py
View file @
017f248d
...
...
@@ -280,9 +280,6 @@ class NodeManager(EventQueue):
self
.
_master_db
.
add
(
node
.
getAddress
())
def
remove
(
self
,
node
):
if
node
not
in
self
.
_node_set
:
logging
.
warning
(
'removing unknown node %r, ignoring'
,
node
)
return
self
.
_node_set
.
remove
(
node
)
# a node may have not be indexed by uuid or address, eg.:
# - a client or admin node that don't have listening address
...
...
neo/master/handlers/administration.py
View file @
017f248d
...
...
@@ -43,7 +43,8 @@ class AdministrationHandler(MasterHandler):
def
connectionLost
(
self
,
conn
,
new_state
):
node
=
self
.
app
.
nm
.
getByUUID
(
conn
.
getUUID
())
self
.
app
.
nm
.
remove
(
node
)
if
node
is
not
None
:
self
.
app
.
nm
.
remove
(
node
)
def
setClusterState
(
self
,
conn
,
state
):
app
=
self
.
app
...
...
neo/master/handlers/client.py
View file @
017f248d
...
...
@@ -30,7 +30,6 @@ class ClientServiceHandler(MasterHandler):
app
.
tm
.
clientLost
(
node
)
node
.
setUnknown
()
app
.
broadcastNodesInformation
([
node
])
app
.
nm
.
remove
(
node
)
def
askBeginTransaction
(
self
,
conn
,
tid
):
"""
...
...
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