Commit 08bbcc96 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:4431], remove toku_pin_brtnode_holding_lock

git-svn-id: file:///svn/toku/tokudb@42765 c7de825b-a66e-492c-adef-691d508d4ae1
parent 97828a53
......@@ -161,39 +161,6 @@ toku_pin_brtnode(
return r;
}
void
toku_pin_brtnode_holding_lock(
BRT brt,
BLOCKNUM blocknum,
u_int32_t fullhash,
ANCESTORS ancestors,
const PIVOT_BOUNDS bounds,
BRTNODE_FETCH_EXTRA bfe,
BOOL apply_ancestor_messages, // this BOOL is probably temporary, for #3972, once we know how range query estimates work, will revisit this
BOOL may_modify_node,
BRTNODE *node_p)
{
void *node_v;
int r = toku_cachetable_get_and_pin(
brt->cf,
blocknum,
fullhash,
&node_v,
NULL,
get_write_callbacks_for_node(brt->h),
toku_brtnode_fetch_callback,
toku_brtnode_pf_req_callback,
toku_brtnode_pf_callback,
may_modify_node,
bfe
);
assert(r==0);
BRTNODE node = node_v;
BOOL msgs_applied;
if (apply_ancestor_messages) maybe_apply_ancestors_messages_to_node(brt, node, ancestors, bounds, &msgs_applied);
*node_p = node;
}
void
toku_pin_brtnode_off_client_thread(
struct brt_header* h,
......
......@@ -74,27 +74,10 @@ toku_pin_brtnode(
BOOL* msgs_applied
);
/**
* see comments for toku_pin_brtnode
*/
void
toku_pin_brtnode_holding_lock(
BRT brt,
BLOCKNUM blocknum,
u_int32_t fullhash,
ANCESTORS ancestors,
const PIVOT_BOUNDS pbounds,
BRTNODE_FETCH_EXTRA bfe,
BOOL apply_ancestor_messages,
BOOL may_modify_node,
BRTNODE *node_p
);
/**
* Pin a brtnode off the client thread, which means
* it is pinned without the ydb lock being held.
* As a result, unlike toku_pin_brtnode and
* toku_pin_brtnode_holding_lock, we cannot apply ancestor
* As a result, unlike toku_pin_brtnode, we cannot apply ancestor
* messages.
*/
void
......
......@@ -2720,15 +2720,14 @@ toku_brt_root_put_cmd (BRT brt, BRT_MSG_S * cmd)
// get the root node
struct brtnode_fetch_extra bfe;
fill_bfe_for_full_read(&bfe, brt->h);
toku_pin_brtnode_holding_lock(
brt,
toku_pin_brtnode_off_client_thread(
brt->h,
*rootp,
fullhash,
(ANCESTORS)NULL,
&infinite_bounds,
&bfe,
TRUE,
TRUE, // may_modify_node
0,
NULL,
&node
);
toku_assert_entire_node_in_memory(node);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment