Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
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
nexedi
MariaDB
Commits
8c4c0f0b
Commit
8c4c0f0b
authored
10 years ago
by
Leif Walsh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed ft-verify to work with promotion #250
fixes #250
parent
c66faf39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
ft/ft-internal.h
ft/ft-internal.h
+1
-1
ft/ft-verify.cc
ft/ft-verify.cc
+15
-11
No files found.
ft/ft-internal.h
View file @
8c4c0f0b
...
@@ -1057,7 +1057,7 @@ toku_get_node_for_verify(
...
@@ -1057,7 +1057,7 @@ toku_get_node_for_verify(
int
int
toku_verify_ftnode
(
FT_HANDLE
ft_h
,
toku_verify_ftnode
(
FT_HANDLE
ft_h
,
MSN
rootmsn
,
MSN
parentmsn
,
bool
messages_exist_above
,
MSN
rootmsn
,
MSN
parentmsn
_with_messages
,
bool
messages_exist_above
,
FTNODE
node
,
int
height
,
FTNODE
node
,
int
height
,
const
DBT
*
lesser_pivot
,
// Everything in the subtree should be > lesser_pivot. (lesser_pivot==NULL if there is no lesser pivot.)
const
DBT
*
lesser_pivot
,
// Everything in the subtree should be > lesser_pivot. (lesser_pivot==NULL if there is no lesser pivot.)
const
DBT
*
greatereq_pivot
,
// Everything in the subtree should be <= lesser_pivot. (lesser_pivot==NULL if there is no lesser pivot.)
const
DBT
*
greatereq_pivot
,
// Everything in the subtree should be <= lesser_pivot. (lesser_pivot==NULL if there is no lesser pivot.)
...
...
This diff is collapsed.
Click to expand it.
ft/ft-verify.cc
View file @
8c4c0f0b
...
@@ -310,7 +310,7 @@ toku_get_node_for_verify(
...
@@ -310,7 +310,7 @@ toku_get_node_for_verify(
static
int
static
int
toku_verify_ftnode_internal
(
FT_HANDLE
ft_handle
,
toku_verify_ftnode_internal
(
FT_HANDLE
ft_handle
,
MSN
rootmsn
,
MSN
parentmsn
,
bool
messages_exist_above
,
MSN
rootmsn
,
MSN
parentmsn
_with_messages
,
bool
messages_exist_above
,
FTNODE
node
,
int
height
,
FTNODE
node
,
int
height
,
const
DBT
*
lesser_pivot
,
// Everything in the subtree should be > lesser_pivot. (lesser_pivot==NULL if there is no lesser pivot.)
const
DBT
*
lesser_pivot
,
// Everything in the subtree should be > lesser_pivot. (lesser_pivot==NULL if there is no lesser pivot.)
const
DBT
*
greatereq_pivot
,
// Everything in the subtree should be <= lesser_pivot. (lesser_pivot==NULL if there is no lesser pivot.)
const
DBT
*
greatereq_pivot
,
// Everything in the subtree should be <= lesser_pivot. (lesser_pivot==NULL if there is no lesser pivot.)
...
@@ -328,7 +328,7 @@ toku_verify_ftnode_internal(FT_HANDLE ft_handle,
...
@@ -328,7 +328,7 @@ toku_verify_ftnode_internal(FT_HANDLE ft_handle,
invariant
(
height
==
node
->
height
);
// this is a bad failure if wrong
invariant
(
height
==
node
->
height
);
// this is a bad failure if wrong
}
}
if
(
node
->
height
>
0
&&
messages_exist_above
)
{
if
(
node
->
height
>
0
&&
messages_exist_above
)
{
VERIFY_ASSERTION
((
parentmsn
.
msn
>=
this_msn
.
msn
),
0
,
"node msn must be descending down tree, newest messages at top"
);
VERIFY_ASSERTION
((
parentmsn
_with_messages
.
msn
>=
this_msn
.
msn
),
0
,
"node msn must be descending down tree, newest messages at top"
);
}
}
// Verify that all the pivot keys are in order.
// Verify that all the pivot keys are in order.
for
(
int
i
=
0
;
i
<
node
->
n_children
-
2
;
i
++
)
{
for
(
int
i
=
0
;
i
<
node
->
n_children
-
2
;
i
++
)
{
...
@@ -450,7 +450,7 @@ toku_verify_ftnode_internal(FT_HANDLE ft_handle,
...
@@ -450,7 +450,7 @@ toku_verify_ftnode_internal(FT_HANDLE ft_handle,
// input is a pinned node, on exit, node is unpinned
// input is a pinned node, on exit, node is unpinned
int
int
toku_verify_ftnode
(
FT_HANDLE
ft_handle
,
toku_verify_ftnode
(
FT_HANDLE
ft_handle
,
MSN
rootmsn
,
MSN
parentmsn
,
bool
messages_exist_above
,
MSN
rootmsn
,
MSN
parentmsn
_with_messages
,
bool
messages_exist_above
,
FTNODE
node
,
int
height
,
FTNODE
node
,
int
height
,
const
DBT
*
lesser_pivot
,
// Everything in the subtree should be > lesser_pivot. (lesser_pivot==NULL if there is no lesser pivot.)
const
DBT
*
lesser_pivot
,
// Everything in the subtree should be > lesser_pivot. (lesser_pivot==NULL if there is no lesser pivot.)
const
DBT
*
greatereq_pivot
,
// Everything in the subtree should be <= lesser_pivot. (lesser_pivot==NULL if there is no lesser pivot.)
const
DBT
*
greatereq_pivot
,
// Everything in the subtree should be <= lesser_pivot. (lesser_pivot==NULL if there is no lesser pivot.)
...
@@ -469,7 +469,7 @@ toku_verify_ftnode (FT_HANDLE ft_handle,
...
@@ -469,7 +469,7 @@ toku_verify_ftnode (FT_HANDLE ft_handle,
// Otherwise we'll just do the next call
// Otherwise we'll just do the next call
result
=
toku_verify_ftnode_internal
(
result
=
toku_verify_ftnode_internal
(
ft_handle
,
rootmsn
,
parentmsn
,
messages_exist_above
,
node
,
height
,
lesser_pivot
,
greatereq_pivot
,
ft_handle
,
rootmsn
,
parentmsn
_with_messages
,
messages_exist_above
,
node
,
height
,
lesser_pivot
,
greatereq_pivot
,
verbose
,
keep_going_on_failure
,
false
);
verbose
,
keep_going_on_failure
,
false
);
if
(
result
!=
0
&&
(
!
keep_going_on_failure
||
result
!=
TOKUDB_NEEDS_REPAIR
))
goto
done
;
if
(
result
!=
0
&&
(
!
keep_going_on_failure
||
result
!=
TOKUDB_NEEDS_REPAIR
))
goto
done
;
}
}
...
@@ -477,7 +477,7 @@ toku_verify_ftnode (FT_HANDLE ft_handle,
...
@@ -477,7 +477,7 @@ toku_verify_ftnode (FT_HANDLE ft_handle,
toku_move_ftnode_messages_to_stale
(
ft_handle
->
ft
,
node
);
toku_move_ftnode_messages_to_stale
(
ft_handle
->
ft
,
node
);
}
}
result2
=
toku_verify_ftnode_internal
(
result2
=
toku_verify_ftnode_internal
(
ft_handle
,
rootmsn
,
parentmsn
,
messages_exist_above
,
node
,
height
,
lesser_pivot
,
greatereq_pivot
,
ft_handle
,
rootmsn
,
parentmsn
_with_messages
,
messages_exist_above
,
node
,
height
,
lesser_pivot
,
greatereq_pivot
,
verbose
,
keep_going_on_failure
,
true
);
verbose
,
keep_going_on_failure
,
true
);
if
(
result
==
0
)
{
if
(
result
==
0
)
{
result
=
result2
;
result
=
result2
;
...
@@ -489,12 +489,16 @@ toku_verify_ftnode (FT_HANDLE ft_handle,
...
@@ -489,12 +489,16 @@ toku_verify_ftnode (FT_HANDLE ft_handle,
for
(
int
i
=
0
;
i
<
node
->
n_children
;
i
++
)
{
for
(
int
i
=
0
;
i
<
node
->
n_children
;
i
++
)
{
FTNODE
child_node
;
FTNODE
child_node
;
toku_get_node_for_verify
(
BP_BLOCKNUM
(
node
,
i
),
ft_handle
,
&
child_node
);
toku_get_node_for_verify
(
BP_BLOCKNUM
(
node
,
i
),
ft_handle
,
&
child_node
);
int
r
=
toku_verify_ftnode
(
ft_handle
,
rootmsn
,
this_msn
,
messages_exist_above
||
toku_bnc_n_entries
(
BNC
(
node
,
i
))
>
0
,
int
r
=
toku_verify_ftnode
(
ft_handle
,
rootmsn
,
child_node
,
node
->
height
-
1
,
(
toku_bnc_n_entries
(
BNC
(
node
,
i
))
>
0
(
i
==
0
)
?
lesser_pivot
:
&
node
->
childkeys
[
i
-
1
],
?
this_msn
(
i
==
node
->
n_children
-
1
)
?
greatereq_pivot
:
&
node
->
childkeys
[
i
],
:
parentmsn_with_messages
),
progress_callback
,
progress_extra
,
messages_exist_above
||
toku_bnc_n_entries
(
BNC
(
node
,
i
))
>
0
,
recurse
,
verbose
,
keep_going_on_failure
);
child_node
,
node
->
height
-
1
,
(
i
==
0
)
?
lesser_pivot
:
&
node
->
childkeys
[
i
-
1
],
(
i
==
node
->
n_children
-
1
)
?
greatereq_pivot
:
&
node
->
childkeys
[
i
],
progress_callback
,
progress_extra
,
recurse
,
verbose
,
keep_going_on_failure
);
if
(
r
)
{
if
(
r
)
{
result
=
r
;
result
=
r
;
if
(
!
keep_going_on_failure
||
result
!=
TOKUDB_NEEDS_REPAIR
)
goto
done
;
if
(
!
keep_going_on_failure
||
result
!=
TOKUDB_NEEDS_REPAIR
)
goto
done
;
...
...
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