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
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
26b1246a
Commit
26b1246a
authored
5 years ago
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
importer: speed up startup when the import is already finished
parent
9d14ea1b
master
MDEV-20693
drop
old-proto
reflink
wc2
wc2-future
web-admin
v1.12
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
neo/storage/database/importer.py
neo/storage/database/importer.py
+8
-2
No files found.
neo/storage/database/importer.py
View file @
26b1246a
...
...
@@ -444,8 +444,11 @@ class ImporterDatabaseManager(DatabaseManager):
zodb
=
self
.
zodb
[
-
1
]
self
.
zodb_loid
=
zodb
.
shift_oid
+
zodb
.
next_oid
-
1
self
.
zodb_tid
=
self
.
db
.
getLastTID
(
self
.
zodb_ltid
)
or
0
if
callable
(
self
.
_import
):
self
.
_import
=
self
.
_import
()
if
callable
(
self
.
_import
):
# XXX: why ?
if
self
.
zodb_tid
==
self
.
zodb_ltid
:
self
.
_finished
()
else
:
self
.
_import
=
self
.
_import
()
def
doOperation
(
self
,
app
):
if
self
.
_import
:
...
...
@@ -505,6 +508,9 @@ class ImporterDatabaseManager(DatabaseManager):
if
process
:
process
.
join
()
self
.
commit
()
self
.
_finished
()
def
_finished
(
self
):
logging
.
warning
(
"All data are imported. You should change"
" your configuration to use the native backend and restart."
)
self
.
_import
=
None
...
...
This diff is collapsed.
Click to expand it.
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