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
Carlos Ramos Carreño
neoppod
Commits
68f26415
Commit
68f26415
authored
Apr 30, 2019
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
importer: forbid truncation when writeback is active
parent
dba07e72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
neo/storage/database/importer.py
neo/storage/database/importer.py
+5
-1
No files found.
neo/storage/database/importer.py
View file @
68f26415
...
@@ -641,7 +641,11 @@ class ImporterDatabaseManager(DatabaseManager):
...
@@ -641,7 +641,11 @@ class ImporterDatabaseManager(DatabaseManager):
def
_deleteRange
(
self
,
partition
,
min_tid
=
None
,
max_tid
=
None
):
def
_deleteRange
(
self
,
partition
,
min_tid
=
None
,
max_tid
=
None
):
# Even if everything is imported, we can't truncate below
# Even if everything is imported, we can't truncate below
# because it would import again if we restart with this backend.
# because it would import again if we restart with this backend.
if
min_tid
<
self
.
zodb_ltid
:
# This is also incompatible with writeback, because ZODB has
# no API to truncate.
if
min_tid
<
self
.
zodb_ltid
or
self
.
_writeback
:
# XXX: That's late to fail. The master should ask storage nodes
# whether truncation is possible before going further.
raise
NotImplementedError
raise
NotImplementedError
self
.
db
.
_deleteRange
(
partition
,
min_tid
,
max_tid
)
self
.
db
.
_deleteRange
(
partition
,
min_tid
,
max_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