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
Vincent Pelletier
neoppod
Commits
1551c4a9
Commit
1551c4a9
authored
Sep 11, 2018
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comments, unused import
parent
ce42103a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
neo/client/handlers/storage.py
neo/client/handlers/storage.py
+1
-0
neo/client/transactions.py
neo/client/transactions.py
+1
-1
neo/storage/transactions.py
neo/storage/transactions.py
+3
-3
neo/tests/threaded/__init__.py
neo/tests/threaded/__init__.py
+0
-1
No files found.
neo/client/handlers/storage.py
View file @
1551c4a9
...
...
@@ -30,6 +30,7 @@ from ..exception import NEOStorageReadRetry, NEOStorageDoesNotExistError
class
StorageEventHandler
(
MTEventHandler
):
def
connectionLost
(
self
,
conn
,
new_state
):
# TODO: refactor with connectionFailed
node
=
self
.
app
.
nm
.
getByAddress
(
conn
.
getAddress
())
assert
node
is
not
None
self
.
app
.
cp
.
removeConnection
(
node
)
...
...
neo/client/transactions.py
View file @
1551c4a9
...
...
@@ -91,7 +91,7 @@ class Transaction(object):
'no storage available for write to partition %s'
%
object_id
)
def
written
(
self
,
app
,
uuid
,
oid
):
# When a node
that
is being disconnected by the master because it was
# When a node is being disconnected by the master because it was
# not part of the transaction that caused a conflict, we may receive a
# positive answer (not to be confused with lockless stores) before the
# conflict. Because we have no way to identify such case, we must keep
...
...
neo/storage/transactions.py
View file @
1551c4a9
...
...
@@ -152,9 +152,9 @@ class TransactionManager(EventQueue):
store_lock_dict
=
self
.
_store_lock_dict
replicated
=
self
.
_replicated
notify
=
{
x
[
0
]
for
x
in
replicated
.
iteritems
()
if
x
[
1
]}
# We sort transactions so that in case of mul
iple stores/checks for the
#
same oid, the lock is taken by the highest locking ttid, which will
# delay new transactions.
# We sort transactions so that in case of mul
tiple stores/checks
#
for the same oid, the lock is taken by the highest locking ttid,
#
which will
delay new transactions.
for
txn
,
ttid
in
sorted
((
txn
,
ttid
)
for
ttid
,
txn
in
self
.
_transaction_dict
.
iteritems
()):
if
txn
.
locking_tid
==
MAX_TID
:
...
...
neo/tests/threaded/__init__.py
View file @
1551c4a9
...
...
@@ -23,7 +23,6 @@ from contextlib import contextmanager
from
itertools
import
count
from
functools
import
partial
,
wraps
from
zlib
import
decompress
from
..mock
import
Mock
import
transaction
,
ZODB
import
neo.admin.app
,
neo
.
master
.
app
,
neo
.
storage
.
app
import
neo.client.app
,
neo
.
neoctl
.
app
...
...
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