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
3a93658b
Commit
3a93658b
authored
Dec 30, 2016
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client: comment TransactionContainer and drop duplicate 'object_base_serial_dict'
parent
9eb06ff1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
neo/client/app.py
neo/client/app.py
+16
-11
No files found.
neo/client/app.py
View file @
3a93658b
...
...
@@ -55,6 +55,8 @@ if SignalHandler:
class
TransactionContainer
(
dict
):
# IDEA: Drop this container and use the new set_data/data API on
# transactions (requires transaction >= 1.6).
def
pop
(
self
,
txn
):
return
dict
.
pop
(
self
,
id
(
txn
),
None
)
...
...
@@ -74,17 +76,24 @@ class TransactionContainer(dict):
'queue'
:
SimpleQueue
(),
'txn'
:
txn
,
'ttid'
:
None
,
# data being stored
'data_dict'
:
{},
'data_size'
:
0
,
# data stored: this will go to the cache on tpc_finish
'cache_dict'
:
{},
'cache_size'
:
0
,
'object_base_serial_dict'
:
{},
'object_serial_dict'
:
{},
'object_stored_counter_dict'
:
{},
'conflict_serial_dict'
:
{},
'resolved_conflict_serial_dict'
:
{},
'involved_nodes'
:
set
(),
'checked_nodes'
:
set
(),
# serial being stored
'object_serial_dict'
:
{},
# {oid: serial}
# track successful stores/checks
'object_stored_counter_dict'
:
{},
# {oid: {serial: {storage_id}}}
# conflicts to resolve
'conflict_serial_dict'
:
{},
# {oid: {serial}}
# resolved conflicts
'resolved_conflict_serial_dict'
:
{},
# {oid: {serial}}
# nodes with at least 1 store (object or transaction)
'involved_nodes'
:
set
(),
# {node}
# nodes with at least 1 check
'checked_nodes'
:
set
(),
# {node}
}
return
context
...
...
@@ -443,7 +452,6 @@ class Application(ThreadedApplication):
txn_context
[
'data_dict'
][
oid
]
=
data
# Store data on each node
txn_context
[
'object_stored_counter_dict'
][
oid
]
=
{}
txn_context
[
'object_base_serial_dict'
].
setdefault
(
oid
,
serial
)
txn_context
[
'object_serial_dict'
][
oid
]
=
serial
queue
=
txn_context
[
'queue'
]
involved_nodes
=
txn_context
[
'involved_nodes'
]
...
...
@@ -478,7 +486,6 @@ class Application(ThreadedApplication):
append
=
result
.
append
# Check for conflicts
data_dict
=
txn_context
[
'data_dict'
]
object_base_serial_dict
=
txn_context
[
'object_base_serial_dict'
]
object_serial_dict
=
txn_context
[
'object_serial_dict'
]
conflict_serial_dict
=
txn_context
[
'conflict_serial_dict'
].
copy
()
txn_context
[
'conflict_serial_dict'
].
clear
()
...
...
@@ -559,8 +566,6 @@ class Application(ThreadedApplication):
dump
(
conflict_serial
))
# Mark this conflict as resolved
resolved_serial_set
.
update
(
conflict_serial_set
)
# Base serial changes too, as we resolved a conflict
object_base_serial_dict
[
oid
]
=
conflict_serial
# Try to store again
self
.
_store
(
txn_context
,
oid
,
conflict_serial
,
new_data
)
append
(
oid
)
...
...
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