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
Jérome Perrin
neoppod
Commits
20b7cecd
Commit
20b7cecd
authored
Nov 20, 2015
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TODO: review election timeouts and transaction aborting on client disconnection
parent
79ea07c8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
neo/master/app.py
neo/master/app.py
+4
-0
neo/master/transactions.py
neo/master/transactions.py
+4
-0
No files found.
neo/master/app.py
View file @
20b7cecd
...
@@ -203,6 +203,9 @@ class Application(BaseApplication):
...
@@ -203,6 +203,9 @@ class Application(BaseApplication):
# Wait until the connections are closed.
# Wait until the connections are closed.
self
.
primary
=
None
self
.
primary
=
None
self
.
primary_master_node
=
None
self
.
primary_master_node
=
None
# XXX: Since poll does not wake up anymore every second,
# the following time condition should be reviewed.
# See also playSecondaryRole.
t
=
time
()
+
10
t
=
time
()
+
10
while
self
.
em
.
getClientList
()
and
time
()
<
t
:
while
self
.
em
.
getClientList
()
and
time
()
<
t
:
try
:
try
:
...
@@ -356,6 +359,7 @@ class Application(BaseApplication):
...
@@ -356,6 +359,7 @@ class Application(BaseApplication):
# Wait for an announcement. If this is too long, probably
# Wait for an announcement. If this is too long, probably
# the primary master is down.
# the primary master is down.
# XXX: Same remark as in electPrimary.
t
=
time
()
+
10
t
=
time
()
+
10
while
self
.
primary_master_node
is
None
:
while
self
.
primary_master_node
is
None
:
self
.
em
.
poll
(
1
)
self
.
em
.
poll
(
1
)
...
...
neo/master/transactions.py
View file @
20b7cecd
...
@@ -378,6 +378,10 @@ class TransactionManager(object):
...
@@ -378,6 +378,10 @@ class TransactionManager(object):
"""
"""
Abort pending transactions initiated by a node
Abort pending transactions initiated by a node
"""
"""
# BUG: As soon as we have started to lock a transaction,
# we should complete it even if the client is lost.
# Of course, we won't reply to the FinishTransaction
# finish but we'll send invalidations to all clients.
logging
.
debug
(
'Abort TXN for %s'
,
node
)
logging
.
debug
(
'Abort TXN for %s'
,
node
)
uuid
=
node
.
getUUID
()
uuid
=
node
.
getUUID
()
# XXX: this loop is usefull only during an import
# XXX: this loop is usefull only during an import
...
...
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