mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 03:51:50 +01:00
[t:4119], remove direct call to toku_cachetable_get_and_pin in the is_empty functions
git-svn-id: file:///svn/toku/tokudb@39028 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
1e8c6c9ad4
commit
6726f69cf0
1 changed files with 15 additions and 33 deletions
42
newbrt/brt.c
42
newbrt/brt.c
|
@ -6243,29 +6243,21 @@ static BOOL is_empty_fast_iter (BRT brt, BRTNODE node) {
|
||||||
}
|
}
|
||||||
BRTNODE childnode;
|
BRTNODE childnode;
|
||||||
{
|
{
|
||||||
void *node_v;
|
|
||||||
BLOCKNUM childblocknum = BP_BLOCKNUM(node,childnum);
|
BLOCKNUM childblocknum = BP_BLOCKNUM(node,childnum);
|
||||||
u_int32_t fullhash = compute_child_fullhash(brt->cf, node, childnum);
|
u_int32_t fullhash = compute_child_fullhash(brt->cf, node, childnum);
|
||||||
struct brtnode_fetch_extra bfe;
|
struct brtnode_fetch_extra bfe;
|
||||||
fill_bfe_for_full_read(&bfe, brt->h);
|
fill_bfe_for_full_read(&bfe, brt->h);
|
||||||
int rr = toku_cachetable_get_and_pin(
|
// don't need to pass in dependent nodes as we are not
|
||||||
brt->cf,
|
// modifying nodes we are pinning
|
||||||
|
toku_pin_brtnode_off_client_thread(
|
||||||
|
brt->h,
|
||||||
childblocknum,
|
childblocknum,
|
||||||
fullhash,
|
fullhash,
|
||||||
&node_v,
|
|
||||||
NULL,
|
|
||||||
toku_brtnode_flush_callback,
|
|
||||||
toku_brtnode_fetch_callback,
|
|
||||||
toku_brtnode_pe_est_callback,
|
|
||||||
toku_brtnode_pe_callback,
|
|
||||||
toku_brtnode_pf_req_callback,
|
|
||||||
toku_brtnode_pf_callback,
|
|
||||||
toku_brtnode_cleaner_callback,
|
|
||||||
&bfe,
|
&bfe,
|
||||||
brt->h
|
0,
|
||||||
|
NULL,
|
||||||
|
&childnode
|
||||||
);
|
);
|
||||||
assert(rr ==0);
|
|
||||||
childnode = node_v;
|
|
||||||
}
|
}
|
||||||
int child_is_empty = is_empty_fast_iter(brt, childnode);
|
int child_is_empty = is_empty_fast_iter(brt, childnode);
|
||||||
toku_unpin_brtnode(brt, childnode);
|
toku_unpin_brtnode(brt, childnode);
|
||||||
|
@ -6294,27 +6286,17 @@ BOOL toku_brt_is_empty_fast (BRT brt)
|
||||||
toku_brtheader_grab_treelock(brt->h);
|
toku_brtheader_grab_treelock(brt->h);
|
||||||
|
|
||||||
CACHEKEY *rootp = toku_calculate_root_offset_pointer(brt->h, &fullhash);
|
CACHEKEY *rootp = toku_calculate_root_offset_pointer(brt->h, &fullhash);
|
||||||
void *node_v;
|
|
||||||
struct brtnode_fetch_extra bfe;
|
struct brtnode_fetch_extra bfe;
|
||||||
fill_bfe_for_full_read(&bfe, brt->h);
|
fill_bfe_for_full_read(&bfe, brt->h);
|
||||||
int rr = toku_cachetable_get_and_pin(
|
toku_pin_brtnode_off_client_thread(
|
||||||
brt->cf,
|
brt->h,
|
||||||
*rootp,
|
*rootp,
|
||||||
fullhash,
|
fullhash,
|
||||||
&node_v,
|
|
||||||
NULL,
|
|
||||||
toku_brtnode_flush_callback,
|
|
||||||
toku_brtnode_fetch_callback,
|
|
||||||
toku_brtnode_pe_est_callback,
|
|
||||||
toku_brtnode_pe_callback,
|
|
||||||
toku_brtnode_pf_req_callback,
|
|
||||||
toku_brtnode_pf_callback,
|
|
||||||
toku_brtnode_cleaner_callback,
|
|
||||||
&bfe,
|
&bfe,
|
||||||
brt->h
|
0,
|
||||||
|
NULL,
|
||||||
|
&node
|
||||||
);
|
);
|
||||||
assert_zero(rr);
|
|
||||||
node = node_v;
|
|
||||||
|
|
||||||
toku_brtheader_release_treelock(brt->h);
|
toku_brtheader_release_treelock(brt->h);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue