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
a0dd4a3b
Commit
a0dd4a3b
authored
Jun 19, 2018
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: clarify log about data deletion of discarded cells
parent
d612fc84
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
neo/storage/handlers/initialization.py
neo/storage/handlers/initialization.py
+8
-8
No files found.
neo/storage/handlers/initialization.py
View file @
a0dd4a3b
...
...
@@ -28,21 +28,21 @@ class InitializationHandler(BaseMasterHandler):
raise
ProtocolError
(
'Partial partition table received'
)
# Install the partition table into the database for persistence.
cell_list
=
[]
offset_list
=
xrange
(
pt
.
getPartitions
())
unassigned_set
=
set
(
offset_list
)
for
offset
in
offset_list
:
unassigned
=
range
(
pt
.
getPartitions
())
for
offset
in
reversed
(
unassigned
):
for
cell
in
pt
.
getCellList
(
offset
):
cell_list
.
append
((
offset
,
cell
.
getUUID
(),
cell
.
getState
()))
if
cell
.
getUUID
()
==
app
.
uuid
:
unassigned
_set
.
remove
(
offset
)
unassigned
.
remove
(
offset
)
# delete objects database
dm
=
app
.
dm
if
unassigned
_set
:
if
unassigned
:
if
app
.
disable_drop_partitions
:
logging
.
info
(
"don't drop data for partitions %r"
,
unassigned_set
)
logging
.
info
(
'partitions %r are discarded but actual deletion'
' of data is disabled'
,
unassigned
)
else
:
logging
.
debug
(
'drop data for partitions %r'
,
unassigned
_set
)
dm
.
dropPartitions
(
unassigned
_set
)
logging
.
debug
(
'drop data for partitions %r'
,
unassigned
)
dm
.
dropPartitions
(
unassigned
)
dm
.
changePartitionTable
(
ptid
,
cell_list
,
reset
=
True
)
dm
.
commit
()
...
...
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