Commit 71fc5599 authored by John Esmet's avatar John Esmet

Rename toku_pin_ftnode to toku_pin_ftnode_for_query, since it does

query-specific things like applying ancestors messages and upgrading
PL_READ to PL_WRITE_CHEAP in such a scenario
parent 6ba9232d
...@@ -201,7 +201,7 @@ toku_create_new_ftnode ( ...@@ -201,7 +201,7 @@ toku_create_new_ftnode (
// then a PL_WRITE_CHEAP lock is grabbed // then a PL_WRITE_CHEAP lock is grabbed
// //
int int
toku_pin_ftnode( toku_pin_ftnode_for_query(
FT_HANDLE brt, FT_HANDLE brt,
BLOCKNUM blocknum, BLOCKNUM blocknum,
uint32_t fullhash, uint32_t fullhash,
......
...@@ -139,7 +139,7 @@ toku_create_new_ftnode ( ...@@ -139,7 +139,7 @@ toku_create_new_ftnode (
); );
int int
toku_pin_ftnode( toku_pin_ftnode_for_query(
FT_HANDLE brt, FT_HANDLE brt,
BLOCKNUM blocknum, BLOCKNUM blocknum,
uint32_t fullhash, uint32_t fullhash,
......
...@@ -5173,7 +5173,7 @@ ft_search_child(FT_HANDLE brt, FTNODE node, int childnum, ft_search_t *search, F ...@@ -5173,7 +5173,7 @@ ft_search_child(FT_HANDLE brt, FTNODE node, int childnum, ft_search_t *search, F
); );
bool msgs_applied = false; bool msgs_applied = false;
{ {
int rr = toku_pin_ftnode(brt, childblocknum, fullhash, int rr = toku_pin_ftnode_for_query(brt, childblocknum, fullhash,
unlockers, unlockers,
&next_ancestors, bounds, &next_ancestors, bounds,
&bfe, &bfe,
...@@ -6010,7 +6010,7 @@ toku_ft_keysrange_internal (FT_HANDLE brt, FTNODE node, ...@@ -6010,7 +6010,7 @@ toku_ft_keysrange_internal (FT_HANDLE brt, FTNODE node,
FTNODE childnode; FTNODE childnode;
bool msgs_applied = false; bool msgs_applied = false;
bool child_may_find_right = may_find_right && left_child_number == right_child_number; bool child_may_find_right = may_find_right && left_child_number == right_child_number;
r = toku_pin_ftnode( r = toku_pin_ftnode_for_query(
brt, brt,
childblocknum, childblocknum,
fullhash, fullhash,
...@@ -6225,7 +6225,7 @@ static int get_key_after_bytes_in_child(FT_HANDLE ft_h, FT ft, FTNODE node, UNLO ...@@ -6225,7 +6225,7 @@ static int get_key_after_bytes_in_child(FT_HANDLE ft_h, FT ft, FTNODE node, UNLO
uint32_t fullhash = compute_child_fullhash(ft->cf, node, childnum); uint32_t fullhash = compute_child_fullhash(ft->cf, node, childnum);
FTNODE child; FTNODE child;
bool msgs_applied = false; bool msgs_applied = false;
r = toku_pin_ftnode(ft_h, childblocknum, fullhash, unlockers, &next_ancestors, bounds, bfe, false, &child, &msgs_applied); r = toku_pin_ftnode_for_query(ft_h, childblocknum, fullhash, unlockers, &next_ancestors, bounds, bfe, false, &child, &msgs_applied);
paranoid_invariant(!msgs_applied); paranoid_invariant(!msgs_applied);
if (r == TOKUDB_TRY_AGAIN) { if (r == TOKUDB_TRY_AGAIN) {
return r; return r;
......
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