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
988165a8
Commit
988165a8
authored
Mar 24, 2015
by
Rik Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FT-646 improve verify error messages for errors in basement nodes
parent
cfa745e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
ft/ft-verify.cc
ft/ft-verify.cc
+11
-9
No files found.
ft/ft-verify.cc
View file @
988165a8
...
...
@@ -158,10 +158,14 @@ get_ith_key_dbt (BASEMENTNODE bn, int i) {
#define VERIFY_ASSERTION(predicate, i, string) ({ \
if(!(predicate)) { \
(void) verbose; \
if (true) { \
fprintf(stderr, "%s:%d: Looking at child %d of block %" PRId64 ": %s\n", __FILE__, __LINE__, i, blocknum.b, string); \
} \
fprintf(stderr, "%s:%d: Looking at child %d of block %" PRId64 ": %s\n", __FILE__, __LINE__, i, blocknum.b, string); \
result = TOKUDB_NEEDS_REPAIR; \
if (!keep_going_on_failure) goto done; \
}})
#define VERIFY_ASSERTION_BASEMENT(predicate, bn, entry, string) ({ \
if(!(predicate)) { \
fprintf(stderr, "%s:%d: Looking at block %" PRId64 " bn %d entry %d: %s\n", __FILE__, __LINE__, blocknum.b, bn, entry, string); \
result = TOKUDB_NEEDS_REPAIR; \
if (!keep_going_on_failure) goto done; \
}})
...
...
@@ -199,7 +203,6 @@ struct verify_message_tree_extra {
int
verify_message_tree
(
const
int32_t
&
offset
,
const
uint32_t
UU
(
idx
),
struct
verify_message_tree_extra
*
const
e
)
__attribute__
((
nonnull
(
3
)));
int
verify_message_tree
(
const
int32_t
&
offset
,
const
uint32_t
UU
(
idx
),
struct
verify_message_tree_extra
*
const
e
)
{
int
verbose
=
e
->
verbose
;
BLOCKNUM
blocknum
=
e
->
blocknum
;
int
keep_going_on_failure
=
e
->
keep_going_on_failure
;
int
result
=
0
;
...
...
@@ -234,7 +237,6 @@ int error_on_iter(const int32_t &UU(offset), const uint32_t UU(idx), void *UU(e)
int
verify_marked_messages
(
const
int32_t
&
offset
,
const
uint32_t
UU
(
idx
),
struct
verify_message_tree_extra
*
const
e
)
__attribute__
((
nonnull
(
3
)));
int
verify_marked_messages
(
const
int32_t
&
offset
,
const
uint32_t
UU
(
idx
),
struct
verify_message_tree_extra
*
const
e
)
{
int
verbose
=
e
->
verbose
;
BLOCKNUM
blocknum
=
e
->
blocknum
;
int
keep_going_on_failure
=
e
->
keep_going_on_failure
;
int
result
=
0
;
...
...
@@ -460,16 +462,16 @@ toku_verify_ftnode_internal(FT_HANDLE ft_handle,
DBT
kdbt
=
get_ith_key_dbt
(
bn
,
j
);
if
(
curr_less_pivot
)
{
int
compare
=
compare_pairs
(
ft_handle
,
curr_less_pivot
,
&
kdbt
);
VERIFY_ASSERTION
(
compare
<
0
,
j
,
"The leafentry is >= the lower-bound pivot"
);
VERIFY_ASSERTION
_BASEMENT
(
compare
<
0
,
i
,
j
,
"The leafentry is >= the lower-bound pivot"
);
}
if
(
curr_geq_pivot
)
{
int
compare
=
compare_pairs
(
ft_handle
,
curr_geq_pivot
,
&
kdbt
);
VERIFY_ASSERTION
(
compare
>=
0
,
j
,
"The leafentry is < the upper-bound pivot"
);
VERIFY_ASSERTION
_BASEMENT
(
compare
>=
0
,
i
,
j
,
"The leafentry is < the upper-bound pivot"
);
}
if
(
0
<
j
)
{
DBT
prev_key_dbt
=
get_ith_key_dbt
(
bn
,
j
-
1
);
int
compare
=
compare_pairs
(
ft_handle
,
&
prev_key_dbt
,
&
kdbt
);
VERIFY_ASSERTION
(
compare
<
0
,
j
,
"Adjacent leafentries are out of order"
);
VERIFY_ASSERTION
_BASEMENT
(
compare
<
0
,
i
,
j
,
"Adjacent leafentries are out of order"
);
}
}
}
...
...
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