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
f44007be
Commit
f44007be
authored
Mar 01, 2014
by
John Esmet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove toku_unpin_ftnode_off_client_thread
parent
10842bb9
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
51 additions
and
74 deletions
+51
-74
ft/ft-cachetable-wrappers.cc
ft/ft-cachetable-wrappers.cc
+6
-18
ft/ft-cachetable-wrappers.h
ft/ft-cachetable-wrappers.h
+3
-14
ft/ft-flusher.cc
ft/ft-flusher.cc
+18
-18
ft/ft-hot-flusher.cc
ft/ft-hot-flusher.cc
+1
-1
ft/ft-ops.cc
ft/ft-ops.cc
+2
-2
ft/tests/test-checkpoint-during-flush.cc
ft/tests/test-checkpoint-during-flush.cc
+2
-2
ft/tests/test-checkpoint-during-merge.cc
ft/tests/test-checkpoint-during-merge.cc
+4
-4
ft/tests/test-checkpoint-during-rebalance.cc
ft/tests/test-checkpoint-during-rebalance.cc
+3
-3
ft/tests/test-checkpoint-during-split.cc
ft/tests/test-checkpoint-during-split.cc
+4
-4
ft/tests/test-dirty-flushes-on-cleaner.cc
ft/tests/test-dirty-flushes-on-cleaner.cc
+3
-3
ft/tests/test-flushes-on-cleaner.cc
ft/tests/test-flushes-on-cleaner.cc
+3
-3
ft/tests/test-merges-on-cleaner.cc
ft/tests/test-merges-on-cleaner.cc
+1
-1
ft/tests/test4244.cc
ft/tests/test4244.cc
+1
-1
No files found.
ft/ft-cachetable-wrappers.cc
View file @
f44007be
...
@@ -374,24 +374,12 @@ int toku_maybe_pin_ftnode_clean(FT ft, BLOCKNUM blocknum, uint32_t fullhash, pai
...
@@ -374,24 +374,12 @@ int toku_maybe_pin_ftnode_clean(FT ft, BLOCKNUM blocknum, uint32_t fullhash, pai
return
r
;
return
r
;
}
}
void
void
toku_unpin_ftnode
(
FT
ft
,
FTNODE
node
)
{
toku_unpin_ftnode_off_client_thread
(
FT
ft
,
FTNODE
node
)
int
r
=
toku_cachetable_unpin
(
ft
->
cf
,
{
node
->
ct_pair
,
int
r
=
toku_cachetable_unpin
(
static_cast
<
enum
cachetable_dirty
>
(
node
->
dirty
),
ft
->
cf
,
make_ftnode_pair_attr
(
node
));
node
->
ct_pair
,
invariant_zero
(
r
);
(
enum
cachetable_dirty
)
node
->
dirty
,
make_ftnode_pair_attr
(
node
)
);
assert
(
r
==
0
);
}
void
toku_unpin_ftnode
(
FT
ft
,
FTNODE
node
)
{
// printf("%*sUnpin %ld\n", 8-node->height, "", node->thisnodename.b);
//VERIFY_NODE(brt,node);
toku_unpin_ftnode_off_client_thread
(
ft
,
node
);
}
}
void
void
...
...
ft/ft-cachetable-wrappers.h
View file @
f44007be
...
@@ -179,20 +179,9 @@ toku_pin_ftnode_off_client_thread(
...
@@ -179,20 +179,9 @@ toku_pin_ftnode_off_client_thread(
int
toku_maybe_pin_ftnode_clean
(
FT
ft
,
BLOCKNUM
blocknum
,
uint32_t
fullhash
,
pair_lock_type
lock_type
,
FTNODE
*
nodep
);
int
toku_maybe_pin_ftnode_clean
(
FT
ft
,
BLOCKNUM
blocknum
,
uint32_t
fullhash
,
pair_lock_type
lock_type
,
FTNODE
*
nodep
);
/**
/**
* Effect: Unpin a brt node. Used for
* Effect: Unpin an ftnode.
* nodes that were pinned off client thread.
*/
*/
void
void
toku_unpin_ftnode
(
FT
h
,
FTNODE
node
);
toku_unpin_ftnode_off_client_thread
(
FT
h
,
FTNODE
node
);
void
toku_unpin_ftnode_read_only
(
FT
ft
,
FTNODE
node
);
/**
* Effect: Unpin a brt node.
* Used for nodes pinned on a client thread
*/
void
toku_unpin_ftnode
(
FT
h
,
FTNODE
node
);
void
toku_unpin_ftnode_read_only
(
FT
ft
,
FTNODE
node
);
#endif
#endif
ft/ft-flusher.cc
View file @
f44007be
...
@@ -334,7 +334,7 @@ default_merge_child(struct flusher_advice *fa,
...
@@ -334,7 +334,7 @@ default_merge_child(struct flusher_advice *fa,
// we are just going to unpin child and
// we are just going to unpin child and
// let ft_merge_child pin it again
// let ft_merge_child pin it again
//
//
toku_unpin_ftnode
_off_client_thread
(
h
,
child
);
toku_unpin_ftnode
(
h
,
child
);
//
//
//
//
// it is responsibility of ft_merge_child to unlock parent
// it is responsibility of ft_merge_child to unlock parent
...
@@ -486,8 +486,8 @@ ct_maybe_merge_child(struct flusher_advice *fa,
...
@@ -486,8 +486,8 @@ ct_maybe_merge_child(struct flusher_advice *fa,
default_pick_child_after_split
,
default_pick_child_after_split
,
&
ctme
);
&
ctme
);
toku_unpin_ftnode
_off_client_thread
(
h
,
parent
);
toku_unpin_ftnode
(
h
,
parent
);
toku_unpin_ftnode
_off_client_thread
(
h
,
child
);
toku_unpin_ftnode
(
h
,
child
);
FTNODE
root_node
=
NULL
;
FTNODE
root_node
=
NULL
;
{
{
...
@@ -1082,20 +1082,20 @@ ft_split_child(
...
@@ -1082,20 +1082,20 @@ ft_split_child(
// and possibly continue
// and possibly continue
// flushing one of the children
// flushing one of the children
int
picked_child
=
fa
->
pick_child_after_split
(
h
,
node
,
childnum
,
childnum
+
1
,
fa
->
extra
);
int
picked_child
=
fa
->
pick_child_after_split
(
h
,
node
,
childnum
,
childnum
+
1
,
fa
->
extra
);
toku_unpin_ftnode
_off_client_thread
(
h
,
node
);
toku_unpin_ftnode
(
h
,
node
);
if
(
picked_child
==
childnum
||
if
(
picked_child
==
childnum
||
(
picked_child
<
0
&&
nodea
->
height
>
0
&&
fa
->
should_recursively_flush
(
nodea
,
fa
->
extra
)))
{
(
picked_child
<
0
&&
nodea
->
height
>
0
&&
fa
->
should_recursively_flush
(
nodea
,
fa
->
extra
)))
{
toku_unpin_ftnode
_off_client_thread
(
h
,
nodeb
);
toku_unpin_ftnode
(
h
,
nodeb
);
toku_ft_flush_some_child
(
h
,
nodea
,
fa
);
toku_ft_flush_some_child
(
h
,
nodea
,
fa
);
}
}
else
if
(
picked_child
==
childnum
+
1
||
else
if
(
picked_child
==
childnum
+
1
||
(
picked_child
<
0
&&
nodeb
->
height
>
0
&&
fa
->
should_recursively_flush
(
nodeb
,
fa
->
extra
)))
{
(
picked_child
<
0
&&
nodeb
->
height
>
0
&&
fa
->
should_recursively_flush
(
nodeb
,
fa
->
extra
)))
{
toku_unpin_ftnode
_off_client_thread
(
h
,
nodea
);
toku_unpin_ftnode
(
h
,
nodea
);
toku_ft_flush_some_child
(
h
,
nodeb
,
fa
);
toku_ft_flush_some_child
(
h
,
nodeb
,
fa
);
}
}
else
{
else
{
toku_unpin_ftnode
_off_client_thread
(
h
,
nodea
);
toku_unpin_ftnode
(
h
,
nodea
);
toku_unpin_ftnode
_off_client_thread
(
h
,
nodeb
);
toku_unpin_ftnode
(
h
,
nodeb
);
}
}
}
}
...
@@ -1525,7 +1525,7 @@ ft_merge_child(
...
@@ -1525,7 +1525,7 @@ ft_merge_child(
// unlock the parent
// unlock the parent
paranoid_invariant
(
node
->
dirty
);
paranoid_invariant
(
node
->
dirty
);
toku_unpin_ftnode
_off_client_thread
(
h
,
node
);
toku_unpin_ftnode
(
h
,
node
);
}
}
else
{
else
{
// for test
// for test
...
@@ -1533,14 +1533,14 @@ ft_merge_child(
...
@@ -1533,14 +1533,14 @@ ft_merge_child(
// unlock the parent
// unlock the parent
paranoid_invariant
(
node
->
dirty
);
paranoid_invariant
(
node
->
dirty
);
toku_unpin_ftnode
_off_client_thread
(
h
,
node
);
toku_unpin_ftnode
(
h
,
node
);
toku_unpin_ftnode
_off_client_thread
(
h
,
childb
);
toku_unpin_ftnode
(
h
,
childb
);
}
}
if
(
childa
->
height
>
0
&&
fa
->
should_recursively_flush
(
childa
,
fa
->
extra
))
{
if
(
childa
->
height
>
0
&&
fa
->
should_recursively_flush
(
childa
,
fa
->
extra
))
{
toku_ft_flush_some_child
(
h
,
childa
,
fa
);
toku_ft_flush_some_child
(
h
,
childa
,
fa
);
}
}
else
{
else
{
toku_unpin_ftnode
_off_client_thread
(
h
,
childa
);
toku_unpin_ftnode
(
h
,
childa
);
}
}
}
}
...
@@ -1614,7 +1614,7 @@ void toku_ft_flush_some_child(FT ft, FTNODE parent, struct flusher_advice *fa)
...
@@ -1614,7 +1614,7 @@ void toku_ft_flush_some_child(FT ft, FTNODE parent, struct flusher_advice *fa)
// reactive, we can unpin the parent
// reactive, we can unpin the parent
//
//
if
(
!
may_child_be_reactive
)
{
if
(
!
may_child_be_reactive
)
{
toku_unpin_ftnode
_off_client_thread
(
ft
,
parent
);
toku_unpin_ftnode
(
ft
,
parent
);
parent
=
NULL
;
parent
=
NULL
;
}
}
...
@@ -1632,7 +1632,7 @@ void toku_ft_flush_some_child(FT ft, FTNODE parent, struct flusher_advice *fa)
...
@@ -1632,7 +1632,7 @@ void toku_ft_flush_some_child(FT ft, FTNODE parent, struct flusher_advice *fa)
// for the root with a fresh one
// for the root with a fresh one
enum
reactivity
child_re
=
get_node_reactivity
(
ft
,
child
);
enum
reactivity
child_re
=
get_node_reactivity
(
ft
,
child
);
if
(
parent
&&
child_re
==
RE_STABLE
)
{
if
(
parent
&&
child_re
==
RE_STABLE
)
{
toku_unpin_ftnode
_off_client_thread
(
ft
,
parent
);
toku_unpin_ftnode
(
ft
,
parent
);
parent
=
NULL
;
parent
=
NULL
;
}
}
...
@@ -1671,7 +1671,7 @@ void toku_ft_flush_some_child(FT ft, FTNODE parent, struct flusher_advice *fa)
...
@@ -1671,7 +1671,7 @@ void toku_ft_flush_some_child(FT ft, FTNODE parent, struct flusher_advice *fa)
)
)
{
{
if
(
parent
)
{
if
(
parent
)
{
toku_unpin_ftnode
_off_client_thread
(
ft
,
parent
);
toku_unpin_ftnode
(
ft
,
parent
);
parent
=
NULL
;
parent
=
NULL
;
}
}
//
//
...
@@ -1681,7 +1681,7 @@ void toku_ft_flush_some_child(FT ft, FTNODE parent, struct flusher_advice *fa)
...
@@ -1681,7 +1681,7 @@ void toku_ft_flush_some_child(FT ft, FTNODE parent, struct flusher_advice *fa)
toku_ft_flush_some_child
(
ft
,
child
,
fa
);
toku_ft_flush_some_child
(
ft
,
child
,
fa
);
}
}
else
{
else
{
toku_unpin_ftnode
_off_client_thread
(
ft
,
child
);
toku_unpin_ftnode
(
ft
,
child
);
}
}
}
}
else
if
(
child_re
==
RE_FISSIBLE
)
{
else
if
(
child_re
==
RE_FISSIBLE
)
{
...
@@ -1837,7 +1837,7 @@ toku_ftnode_cleaner_callback(
...
@@ -1837,7 +1837,7 @@ toku_ftnode_cleaner_callback(
ct_flusher_advice_init
(
&
fa
,
&
fste
,
h
->
h
->
nodesize
);
ct_flusher_advice_init
(
&
fa
,
&
fste
,
h
->
h
->
nodesize
);
toku_ft_flush_some_child
(
h
,
node
,
&
fa
);
toku_ft_flush_some_child
(
h
,
node
,
&
fa
);
}
else
{
}
else
{
toku_unpin_ftnode
_off_client_thread
(
h
,
node
);
toku_unpin_ftnode
(
h
,
node
);
}
}
return
0
;
return
0
;
}
}
...
@@ -1897,7 +1897,7 @@ static void flush_node_fun(void *fe_v)
...
@@ -1897,7 +1897,7 @@ static void flush_node_fun(void *fe_v)
toku_ft_flush_some_child
(
fe
->
h
,
fe
->
node
,
&
fa
);
toku_ft_flush_some_child
(
fe
->
h
,
fe
->
node
,
&
fa
);
}
}
else
{
else
{
toku_unpin_ftnode
_off_client_thread
(
fe
->
h
,
fe
->
node
);
toku_unpin_ftnode
(
fe
->
h
,
fe
->
node
);
}
}
}
}
else
{
else
{
...
...
ft/ft-hot-flusher.cc
View file @
f44007be
...
@@ -371,7 +371,7 @@ toku_ft_hot_optimize(FT_HANDLE brt, DBT* left, DBT* right,
...
@@ -371,7 +371,7 @@ toku_ft_hot_optimize(FT_HANDLE brt, DBT* left, DBT* right,
// Since there are no children to flush, we should abort
// Since there are no children to flush, we should abort
// the HOT call.
// the HOT call.
flusher
.
rightmost_leaf_seen
=
1
;
flusher
.
rightmost_leaf_seen
=
1
;
toku_unpin_ftnode
_off_client_thread
(
brt
->
ft
,
root
);
toku_unpin_ftnode
(
brt
->
ft
,
root
);
}
}
// Set the highest pivot key seen here, since the parent may
// Set the highest pivot key seen here, since the parent may
...
...
ft/ft-ops.cc
View file @
f44007be
...
@@ -3180,7 +3180,7 @@ void toku_ft_root_put_msg(
...
@@ -3180,7 +3180,7 @@ void toku_ft_root_put_msg(
ft_init_new_root
(
ft
,
node
,
&
node
);
ft_init_new_root
(
ft
,
node
,
&
node
);
// Then downgrade back to a read lock, and we can finally
// Then downgrade back to a read lock, and we can finally
// do the injection.
// do the injection.
toku_unpin_ftnode
_off_client_thread
(
ft
,
node
);
toku_unpin_ftnode
(
ft
,
node
);
lock_type
=
PL_READ
;
lock_type
=
PL_READ
;
STATUS_INC
(
FT_PRO_NUM_ROOT_SPLIT
,
1
);
STATUS_INC
(
FT_PRO_NUM_ROOT_SPLIT
,
1
);
goto
change_lock_type
;
goto
change_lock_type
;
...
@@ -6430,7 +6430,7 @@ toku_dump_ftnode (FILE *file, FT_HANDLE brt, BLOCKNUM blocknum, int depth, const
...
@@ -6430,7 +6430,7 @@ toku_dump_ftnode (FILE *file, FT_HANDLE brt, BLOCKNUM blocknum, int depth, const
}
}
}
}
}
}
toku_unpin_ftnode
_off_client_thread
(
brt
->
ft
,
node
);
toku_unpin_ftnode
(
brt
->
ft
,
node
);
return
result
;
return
result
;
}
}
...
...
ft/tests/test-checkpoint-during-flush.cc
View file @
f44007be
...
@@ -305,7 +305,7 @@ doit (bool after_child_pin) {
...
@@ -305,7 +305,7 @@ doit (bool after_child_pin) {
else
{
else
{
assert
(
toku_bnc_nbytesinbuf
(
BNC
(
node
,
0
))
>
0
);
assert
(
toku_bnc_nbytesinbuf
(
BNC
(
node
,
0
))
>
0
);
}
}
toku_unpin_ftnode
_off_client_thread
(
c_ft
->
ft
,
node
);
toku_unpin_ftnode
(
c_ft
->
ft
,
node
);
toku_pin_ftnode_off_client_thread
(
toku_pin_ftnode_off_client_thread
(
c_ft
->
ft
,
c_ft
->
ft
,
...
@@ -326,7 +326,7 @@ doit (bool after_child_pin) {
...
@@ -326,7 +326,7 @@ doit (bool after_child_pin) {
else
{
else
{
assert
(
BLB_NBYTESINDATA
(
node
,
0
)
==
0
);
assert
(
BLB_NBYTESINDATA
(
node
,
0
)
==
0
);
}
}
toku_unpin_ftnode
_off_client_thread
(
c_ft
->
ft
,
node
);
toku_unpin_ftnode
(
c_ft
->
ft
,
node
);
struct
check_pair
pair1
=
{
2
,
"a"
,
0
,
NULL
,
0
};
struct
check_pair
pair1
=
{
2
,
"a"
,
0
,
NULL
,
0
};
DBT
k
;
DBT
k
;
...
...
ft/tests/test-checkpoint-during-merge.cc
View file @
f44007be
...
@@ -334,7 +334,7 @@ doit (int state) {
...
@@ -334,7 +334,7 @@ doit (int state) {
else
{
else
{
assert
(
false
);
assert
(
false
);
}
}
toku_unpin_ftnode
_off_client_thread
(
c_ft
->
ft
,
node
);
toku_unpin_ftnode
(
c_ft
->
ft
,
node
);
// now let's verify the leaves are what we expect
// now let's verify the leaves are what we expect
if
(
state
==
flt_flush_before_merge
||
state
==
flt_flush_before_pin_second_node_for_merge
)
{
if
(
state
==
flt_flush_before_merge
||
state
==
flt_flush_before_pin_second_node_for_merge
)
{
...
@@ -353,7 +353,7 @@ doit (int state) {
...
@@ -353,7 +353,7 @@ doit (int state) {
assert
(
!
node
->
dirty
);
assert
(
!
node
->
dirty
);
assert
(
node
->
n_children
==
1
);
assert
(
node
->
n_children
==
1
);
assert
(
BLB_DATA
(
node
,
0
)
->
omt_size
()
==
1
);
assert
(
BLB_DATA
(
node
,
0
)
->
omt_size
()
==
1
);
toku_unpin_ftnode
_off_client_thread
(
c_ft
->
ft
,
node
);
toku_unpin_ftnode
(
c_ft
->
ft
,
node
);
toku_pin_ftnode_off_client_thread
(
toku_pin_ftnode_off_client_thread
(
c_ft
->
ft
,
c_ft
->
ft
,
...
@@ -370,7 +370,7 @@ doit (int state) {
...
@@ -370,7 +370,7 @@ doit (int state) {
assert
(
!
node
->
dirty
);
assert
(
!
node
->
dirty
);
assert
(
node
->
n_children
==
1
);
assert
(
node
->
n_children
==
1
);
assert
(
BLB_DATA
(
node
,
0
)
->
omt_size
()
==
1
);
assert
(
BLB_DATA
(
node
,
0
)
->
omt_size
()
==
1
);
toku_unpin_ftnode
_off_client_thread
(
c_ft
->
ft
,
node
);
toku_unpin_ftnode
(
c_ft
->
ft
,
node
);
}
}
else
if
(
state
==
ft_flush_aflter_merge
||
state
==
flt_flush_before_unpin_remove
)
{
else
if
(
state
==
ft_flush_aflter_merge
||
state
==
flt_flush_before_unpin_remove
)
{
toku_pin_ftnode_off_client_thread
(
toku_pin_ftnode_off_client_thread
(
...
@@ -388,7 +388,7 @@ doit (int state) {
...
@@ -388,7 +388,7 @@ doit (int state) {
assert
(
!
node
->
dirty
);
assert
(
!
node
->
dirty
);
assert
(
node
->
n_children
==
1
);
assert
(
node
->
n_children
==
1
);
assert
(
BLB_DATA
(
node
,
0
)
->
omt_size
()
==
2
);
assert
(
BLB_DATA
(
node
,
0
)
->
omt_size
()
==
2
);
toku_unpin_ftnode
_off_client_thread
(
c_ft
->
ft
,
node
);
toku_unpin_ftnode
(
c_ft
->
ft
,
node
);
}
}
else
{
else
{
assert
(
false
);
assert
(
false
);
...
...
ft/tests/test-checkpoint-during-rebalance.cc
View file @
f44007be
...
@@ -345,7 +345,7 @@ doit (int state) {
...
@@ -345,7 +345,7 @@ doit (int state) {
left_child
=
BP_BLOCKNUM
(
node
,
0
);
left_child
=
BP_BLOCKNUM
(
node
,
0
);
right_child
=
BP_BLOCKNUM
(
node
,
1
);
right_child
=
BP_BLOCKNUM
(
node
,
1
);
toku_unpin_ftnode
_off_client_thread
(
c_ft
->
ft
,
node
);
toku_unpin_ftnode
(
c_ft
->
ft
,
node
);
// now let's verify the leaves are what we expect
// now let's verify the leaves are what we expect
toku_pin_ftnode_off_client_thread
(
toku_pin_ftnode_off_client_thread
(
...
@@ -362,7 +362,7 @@ doit (int state) {
...
@@ -362,7 +362,7 @@ doit (int state) {
assert
(
!
node
->
dirty
);
assert
(
!
node
->
dirty
);
assert
(
node
->
n_children
==
1
);
assert
(
node
->
n_children
==
1
);
assert
(
BLB_DATA
(
node
,
0
)
->
omt_size
()
==
2
);
assert
(
BLB_DATA
(
node
,
0
)
->
omt_size
()
==
2
);
toku_unpin_ftnode
_off_client_thread
(
c_ft
->
ft
,
node
);
toku_unpin_ftnode
(
c_ft
->
ft
,
node
);
toku_pin_ftnode_off_client_thread
(
toku_pin_ftnode_off_client_thread
(
c_ft
->
ft
,
c_ft
->
ft
,
...
@@ -378,7 +378,7 @@ doit (int state) {
...
@@ -378,7 +378,7 @@ doit (int state) {
assert
(
!
node
->
dirty
);
assert
(
!
node
->
dirty
);
assert
(
node
->
n_children
==
1
);
assert
(
node
->
n_children
==
1
);
assert
(
BLB_DATA
(
node
,
0
)
->
omt_size
()
==
2
);
assert
(
BLB_DATA
(
node
,
0
)
->
omt_size
()
==
2
);
toku_unpin_ftnode
_off_client_thread
(
c_ft
->
ft
,
node
);
toku_unpin_ftnode
(
c_ft
->
ft
,
node
);
DBT
k
;
DBT
k
;
...
...
ft/tests/test-checkpoint-during-split.cc
View file @
f44007be
...
@@ -325,7 +325,7 @@ doit (bool after_split) {
...
@@ -325,7 +325,7 @@ doit (bool after_split) {
left_child
=
BP_BLOCKNUM
(
node
,
0
);
left_child
=
BP_BLOCKNUM
(
node
,
0
);
assert
(
left_child
.
b
==
node_leaf
.
b
);
assert
(
left_child
.
b
==
node_leaf
.
b
);
}
}
toku_unpin_ftnode
_off_client_thread
(
c_ft
->
ft
,
node
);
toku_unpin_ftnode
(
c_ft
->
ft
,
node
);
// now let's verify the leaves are what we expect
// now let's verify the leaves are what we expect
if
(
after_split
)
{
if
(
after_split
)
{
...
@@ -343,7 +343,7 @@ doit (bool after_split) {
...
@@ -343,7 +343,7 @@ doit (bool after_split) {
assert
(
!
node
->
dirty
);
assert
(
!
node
->
dirty
);
assert
(
node
->
n_children
==
1
);
assert
(
node
->
n_children
==
1
);
assert
(
BLB_DATA
(
node
,
0
)
->
omt_size
()
==
1
);
assert
(
BLB_DATA
(
node
,
0
)
->
omt_size
()
==
1
);
toku_unpin_ftnode
_off_client_thread
(
c_ft
->
ft
,
node
);
toku_unpin_ftnode
(
c_ft
->
ft
,
node
);
toku_pin_ftnode_off_client_thread
(
toku_pin_ftnode_off_client_thread
(
c_ft
->
ft
,
c_ft
->
ft
,
...
@@ -359,7 +359,7 @@ doit (bool after_split) {
...
@@ -359,7 +359,7 @@ doit (bool after_split) {
assert
(
!
node
->
dirty
);
assert
(
!
node
->
dirty
);
assert
(
node
->
n_children
==
1
);
assert
(
node
->
n_children
==
1
);
assert
(
BLB_DATA
(
node
,
0
)
->
omt_size
()
==
1
);
assert
(
BLB_DATA
(
node
,
0
)
->
omt_size
()
==
1
);
toku_unpin_ftnode
_off_client_thread
(
c_ft
->
ft
,
node
);
toku_unpin_ftnode
(
c_ft
->
ft
,
node
);
}
}
else
{
else
{
toku_pin_ftnode_off_client_thread
(
toku_pin_ftnode_off_client_thread
(
...
@@ -376,7 +376,7 @@ doit (bool after_split) {
...
@@ -376,7 +376,7 @@ doit (bool after_split) {
assert
(
!
node
->
dirty
);
assert
(
!
node
->
dirty
);
assert
(
node
->
n_children
==
1
);
assert
(
node
->
n_children
==
1
);
assert
(
BLB_DATA
(
node
,
0
)
->
omt_size
()
==
2
);
assert
(
BLB_DATA
(
node
,
0
)
->
omt_size
()
==
2
);
toku_unpin_ftnode
_off_client_thread
(
c_ft
->
ft
,
node
);
toku_unpin_ftnode
(
c_ft
->
ft
,
node
);
}
}
...
...
ft/tests/test-dirty-flushes-on-cleaner.cc
View file @
f44007be
...
@@ -255,7 +255,7 @@ doit (void) {
...
@@ -255,7 +255,7 @@ doit (void) {
assert
(
node
->
n_children
==
2
);
assert
(
node
->
n_children
==
2
);
assert
(
BP_STATE
(
node
,
0
)
==
PT_AVAIL
);
assert
(
BP_STATE
(
node
,
0
)
==
PT_AVAIL
);
assert
(
BP_STATE
(
node
,
1
)
==
PT_AVAIL
);
assert
(
BP_STATE
(
node
,
1
)
==
PT_AVAIL
);
toku_unpin_ftnode
_off_client_thread
(
brt
->
ft
,
node
);
toku_unpin_ftnode
(
brt
->
ft
,
node
);
// now do a lookup on one of the keys, this should bring a leaf node up to date
// now do a lookup on one of the keys, this should bring a leaf node up to date
DBT
k
;
DBT
k
;
...
@@ -285,7 +285,7 @@ doit (void) {
...
@@ -285,7 +285,7 @@ doit (void) {
assert
(
node
->
n_children
==
2
);
assert
(
node
->
n_children
==
2
);
assert
(
BP_STATE
(
node
,
0
)
==
PT_AVAIL
);
assert
(
BP_STATE
(
node
,
0
)
==
PT_AVAIL
);
assert
(
BP_STATE
(
node
,
1
)
==
PT_AVAIL
);
assert
(
BP_STATE
(
node
,
1
)
==
PT_AVAIL
);
toku_unpin_ftnode
_off_client_thread
(
brt
->
ft
,
node
);
toku_unpin_ftnode
(
brt
->
ft
,
node
);
//
//
// now let us induce a clean on the internal node
// now let us induce a clean on the internal node
...
@@ -329,7 +329,7 @@ doit (void) {
...
@@ -329,7 +329,7 @@ doit (void) {
);
);
// check that buffers are empty
// check that buffers are empty
assert
(
toku_bnc_nbytesinbuf
(
BNC
(
node
,
0
))
==
0
);
assert
(
toku_bnc_nbytesinbuf
(
BNC
(
node
,
0
))
==
0
);
toku_unpin_ftnode
_off_client_thread
(
brt
->
ft
,
node
);
toku_unpin_ftnode
(
brt
->
ft
,
node
);
//
//
// now run a checkpoint to get everything clean,
// now run a checkpoint to get everything clean,
...
...
ft/tests/test-flushes-on-cleaner.cc
View file @
f44007be
...
@@ -266,7 +266,7 @@ doit (bool keep_other_bn_in_memory) {
...
@@ -266,7 +266,7 @@ doit (bool keep_other_bn_in_memory) {
// that the data is read off disk
// that the data is read off disk
assert
(
BP_STATE
(
node
,
0
)
==
PT_ON_DISK
);
assert
(
BP_STATE
(
node
,
0
)
==
PT_ON_DISK
);
assert
(
BP_STATE
(
node
,
1
)
==
PT_ON_DISK
);
assert
(
BP_STATE
(
node
,
1
)
==
PT_ON_DISK
);
toku_unpin_ftnode
_off_client_thread
(
brt
->
ft
,
node
);
toku_unpin_ftnode
(
brt
->
ft
,
node
);
// now do a lookup on one of the keys, this should bring a leaf node up to date
// now do a lookup on one of the keys, this should bring a leaf node up to date
DBT
k
;
DBT
k
;
...
@@ -312,7 +312,7 @@ doit (bool keep_other_bn_in_memory) {
...
@@ -312,7 +312,7 @@ doit (bool keep_other_bn_in_memory) {
else
{
else
{
assert
(
BP_STATE
(
node
,
1
)
==
PT_ON_DISK
);
assert
(
BP_STATE
(
node
,
1
)
==
PT_ON_DISK
);
}
}
toku_unpin_ftnode
_off_client_thread
(
brt
->
ft
,
node
);
toku_unpin_ftnode
(
brt
->
ft
,
node
);
//
//
// now let us induce a clean on the internal node
// now let us induce a clean on the internal node
...
@@ -354,7 +354,7 @@ doit (bool keep_other_bn_in_memory) {
...
@@ -354,7 +354,7 @@ doit (bool keep_other_bn_in_memory) {
);
);
// check that buffers are empty
// check that buffers are empty
assert
(
toku_bnc_nbytesinbuf
(
BNC
(
node
,
0
))
==
0
);
assert
(
toku_bnc_nbytesinbuf
(
BNC
(
node
,
0
))
==
0
);
toku_unpin_ftnode
_off_client_thread
(
brt
->
ft
,
node
);
toku_unpin_ftnode
(
brt
->
ft
,
node
);
//
//
// now run a checkpoint to get everything clean,
// now run a checkpoint to get everything clean,
...
...
ft/tests/test-merges-on-cleaner.cc
View file @
f44007be
...
@@ -269,7 +269,7 @@ doit (void) {
...
@@ -269,7 +269,7 @@ doit (void) {
assert
(
node
->
n_children
==
1
);
assert
(
node
->
n_children
==
1
);
// check that buffers are empty
// check that buffers are empty
assert
(
toku_bnc_nbytesinbuf
(
BNC
(
node
,
0
))
==
0
);
assert
(
toku_bnc_nbytesinbuf
(
BNC
(
node
,
0
))
==
0
);
toku_unpin_ftnode
_off_client_thread
(
brt
->
ft
,
node
);
toku_unpin_ftnode
(
brt
->
ft
,
node
);
//
//
// now run a checkpoint to get everything clean,
// now run a checkpoint to get everything clean,
...
...
ft/tests/test4244.cc
View file @
f44007be
...
@@ -164,7 +164,7 @@ doit (void) {
...
@@ -164,7 +164,7 @@ doit (void) {
// simply assert that the buffer is less than 50MB,
// simply assert that the buffer is less than 50MB,
// we inserted 100MB of data in there.
// we inserted 100MB of data in there.
assert
(
toku_bnc_nbytesinbuf
(
BNC
(
node
,
0
))
<
50
*
1000
*
1000
);
assert
(
toku_bnc_nbytesinbuf
(
BNC
(
node
,
0
))
<
50
*
1000
*
1000
);
toku_unpin_ftnode
_off_client_thread
(
t
->
ft
,
node
);
toku_unpin_ftnode
(
t
->
ft
,
node
);
r
=
toku_close_ft_handle_nolsn
(
t
,
0
);
assert
(
r
==
0
);
r
=
toku_close_ft_handle_nolsn
(
t
,
0
);
assert
(
r
==
0
);
toku_cachetable_close
(
&
ct
);
toku_cachetable_close
(
&
ct
);
...
...
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