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
4865fa0e
Commit
4865fa0e
authored
May 10, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip
parent
788b65f9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
neo/storage/database/manager.py
neo/storage/database/manager.py
+2
-0
neo/storage/database/mysqldb.py
neo/storage/database/mysqldb.py
+3
-0
No files found.
neo/storage/database/manager.py
View file @
4865fa0e
...
@@ -519,9 +519,11 @@ class DatabaseManager(object):
...
@@ -519,9 +519,11 @@ class DatabaseManager(object):
if
log
==
dropped
:
if
log
==
dropped
:
dropped
+=
1
dropped
+=
1
logging
.
info
(
"dropping partition %s..."
,
offset
)
logging
.
info
(
"dropping partition %s..."
,
offset
)
logging
.
debug
(
'drop: pruneData(%s)'
,
len
(
data_id_list
))
drop_count
+=
self
.
_pruneData
(
data_id_list
)
drop_count
+=
self
.
_pruneData
(
data_id_list
)
drop_time
+=
time
()
-
start
drop_time
+=
time
()
-
start
self
.
commit
()
self
.
commit
()
logging
.
debug
(
'drop: committed'
)
self
.
_drop_stats
=
drop_count
,
drop_time
self
.
_drop_stats
=
drop_count
,
drop_time
if
dropped
:
if
dropped
:
logging
.
info
(
"%s partition(s) dropped"
logging
.
info
(
"%s partition(s) dropped"
...
...
neo/storage/database/mysqldb.py
View file @
4865fa0e
...
@@ -409,10 +409,13 @@ class MySQLDatabaseManager(DatabaseManager):
...
@@ -409,10 +409,13 @@ class MySQLDatabaseManager(DatabaseManager):
q
=
self
.
query
q
=
self
.
query
where
=
" WHERE `partition`=%s ORDER BY tid, oid LIMIT %s"
%
(
where
=
" WHERE `partition`=%s ORDER BY tid, oid LIMIT %s"
%
(
offset
,
count
)
offset
,
count
)
logging
.
debug
(
"drop: select(%s)"
,
count
)
x
=
q
(
"SELECT data_id FROM obj USE INDEX(PRIMARY)"
+
where
)
x
=
q
(
"SELECT data_id FROM obj USE INDEX(PRIMARY)"
+
where
)
if
x
:
if
x
:
logging
.
debug
(
"drop: obj"
)
q
(
"DELETE FROM obj"
+
where
)
q
(
"DELETE FROM obj"
+
where
)
return
[
x
for
x
,
in
x
if
x
]
return
[
x
for
x
,
in
x
if
x
]
logging
.
debug
(
"drop: trans"
)
q
(
"DELETE FROM trans WHERE `partition`=%s"
%
offset
)
q
(
"DELETE FROM trans WHERE `partition`=%s"
%
offset
)
def
_getUnfinishedDataIdList
(
self
):
def
_getUnfinishedDataIdList
(
self
):
...
...
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