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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
e918039e
Commit
e918039e
authored
Apr 27, 2012
by
Zardosht Kasheff
Committed by
Yoni Fogel
Apr 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[t:4793], add a test
git-svn-id:
file:///svn/toku/tokudb@42600
c7de825b-a66e-492c-adef-691d508d4ae1
parent
41d97658
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
10 deletions
+28
-10
newbrt/tests/test-flushes-on-cleaner.c
newbrt/tests/test-flushes-on-cleaner.c
+28
-10
No files found.
newbrt/tests/test-flushes-on-cleaner.c
View file @
e918039e
...
...
@@ -41,7 +41,7 @@ static int update_func(
static
void
doit
(
void
)
{
doit
(
BOOL
keep_other_bn_in_memory
)
{
BLOCKNUM
node_leaf
;
BLOCKNUM
node_internal
,
node_root
;
...
...
@@ -195,13 +195,25 @@ doit (void) {
r
=
toku_brt_lookup
(
brt
,
toku_fill_dbt
(
&
k
,
"a"
,
2
),
lookup_checkf
,
&
pair
);
assert
(
r
==
0
);
//
// pin the leaf one more time
// and make sure that one basement
// node is in memory and another is
// on disk
//
fill_bfe_for_min_read
(
&
bfe
,
brt
->
h
);
if
(
keep_other_bn_in_memory
)
{
//
// pin the leaf one more time
// and make sure that one basement
// both basement nodes are in memory,
// but only one should have broadcast message
// applied.
//
fill_bfe_for_full_read
(
&
bfe
,
brt
->
h
);
}
else
{
//
// pin the leaf one more time
// and make sure that one basement
// node is in memory and another is
// on disk
//
fill_bfe_for_min_read
(
&
bfe
,
brt
->
h
);
}
toku_pin_brtnode_off_client_thread
(
brt
->
h
,
node_leaf
,
...
...
@@ -215,7 +227,12 @@ doit (void) {
assert
(
!
node
->
dirty
);
assert
(
node
->
n_children
==
2
);
assert
(
BP_STATE
(
node
,
0
)
==
PT_AVAIL
);
assert
(
BP_STATE
(
node
,
1
)
==
PT_ON_DISK
);
if
(
keep_other_bn_in_memory
)
{
assert
(
BP_STATE
(
node
,
1
)
==
PT_AVAIL
);
}
else
{
assert
(
BP_STATE
(
node
,
1
)
==
PT_ON_DISK
);
}
toku_unpin_brtnode_off_client_thread
(
brt
->
h
,
node
);
//
...
...
@@ -285,6 +302,7 @@ doit (void) {
int
test_main
(
int
argc
__attribute__
((
__unused__
)),
const
char
*
argv
[]
__attribute__
((
__unused__
)))
{
default_parse_args
(
argc
,
argv
);
doit
();
doit
(
FALSE
);
doit
(
TRUE
);
return
0
;
}
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