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
aeeada3a
Commit
aeeada3a
authored
Aug 22, 2012
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: commit when replicating many transactions
parent
c378da4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
neo/storage/handlers/storage.py
neo/storage/handlers/storage.py
+6
-0
No files found.
neo/storage/handlers/storage.py
View file @
aeeada3a
...
...
@@ -77,6 +77,9 @@ class StorageOperationHandler(EventHandler):
deleteTransaction
(
tid
)
assert
not
pack_tid
,
"TODO"
if
next_tid
:
# More than one chunk ? This could a full replication so avoid
# restarting from the beginning by committing now.
self
.
app
.
dm
.
commit
()
self
.
app
.
replicator
.
fetchTransactions
(
next_tid
)
else
:
self
.
app
.
replicator
.
fetchObjects
()
...
...
@@ -96,6 +99,9 @@ class StorageOperationHandler(EventHandler):
for
serial
,
oid_list
in
object_dict
.
iteritems
():
for
oid
in
oid_list
:
deleteObject
(
oid
,
serial
)
# XXX: It should be possible not to commit here if it was the last
# chunk, because we'll either commit again when updating
# 'backup_tid' or the partition table.
self
.
app
.
dm
.
commit
()
assert
not
pack_tid
,
"TODO"
if
next_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