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
ec9da302
Commit
ec9da302
authored
Nov 11, 2011
by
Zardosht Kasheff
Committed by
Yoni Fogel
Apr 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[t:4130], fix bug
git-svn-id:
file:///svn/toku/tokudb@36837
c7de825b-a66e-492c-adef-691d508d4ae1
parent
baab86bc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
newbrt/brt-internal.h
newbrt/brt-internal.h
+1
-0
newbrt/brt.c
newbrt/brt.c
+6
-4
No files found.
newbrt/brt-internal.h
View file @
ec9da302
...
@@ -653,6 +653,7 @@ int toku_pin_brtnode (BRT brt, BLOCKNUM blocknum, u_int32_t fullhash,
...
@@ -653,6 +653,7 @@ int toku_pin_brtnode (BRT brt, BLOCKNUM blocknum, u_int32_t fullhash,
UNLOCKERS
unlockers
,
UNLOCKERS
unlockers
,
ANCESTORS
ancestors
,
struct
pivot_bounds
const
*
const
pbounds
,
ANCESTORS
ancestors
,
struct
pivot_bounds
const
*
const
pbounds
,
struct
brtnode_fetch_extra
*
bfe
,
struct
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
BRTNODE
*
node_p
)
BRTNODE
*
node_p
)
__attribute__
((
__warn_unused_result__
));
__attribute__
((
__warn_unused_result__
));
void
toku_pin_brtnode_holding_lock
(
BRT
brt
,
BLOCKNUM
blocknum
,
u_int32_t
fullhash
,
void
toku_pin_brtnode_holding_lock
(
BRT
brt
,
BLOCKNUM
blocknum
,
u_int32_t
fullhash
,
...
...
newbrt/brt.c
View file @
ec9da302
...
@@ -289,6 +289,7 @@ int toku_pin_brtnode (BRT brt, BLOCKNUM blocknum, u_int32_t fullhash,
...
@@ -289,6 +289,7 @@ int toku_pin_brtnode (BRT brt, BLOCKNUM blocknum, u_int32_t fullhash,
UNLOCKERS
unlockers
,
UNLOCKERS
unlockers
,
ANCESTORS
ancestors
,
struct
pivot_bounds
const
*
const
bounds
,
ANCESTORS
ancestors
,
struct
pivot_bounds
const
*
const
bounds
,
struct
brtnode_fetch_extra
*
bfe
,
struct
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
BRTNODE
*
node_p
)
{
BRTNODE
*
node_p
)
{
void
*
node_v
;
void
*
node_v
;
int
r
=
toku_cachetable_get_and_pin_nonblocking
(
int
r
=
toku_cachetable_get_and_pin_nonblocking
(
...
@@ -309,7 +310,7 @@ int toku_pin_brtnode (BRT brt, BLOCKNUM blocknum, u_int32_t fullhash,
...
@@ -309,7 +310,7 @@ int toku_pin_brtnode (BRT brt, BLOCKNUM blocknum, u_int32_t fullhash,
unlockers
);
unlockers
);
if
(
r
==
0
)
{
if
(
r
==
0
)
{
BRTNODE
node
=
node_v
;
BRTNODE
node
=
node_v
;
maybe_apply_ancestors_messages_to_node
(
brt
,
node
,
ancestors
,
bounds
);
if
(
apply_ancestor_messages
)
maybe_apply_ancestors_messages_to_node
(
brt
,
node
,
ancestors
,
bounds
);
*
node_p
=
node
;
*
node_p
=
node
;
// printf("%*sPin %ld\n", 8-node->height, "", blocknum.b);
// printf("%*sPin %ld\n", 8-node->height, "", blocknum.b);
}
else
{
}
else
{
...
@@ -6242,6 +6243,7 @@ brt_search_child(BRT brt, BRTNODE node, int childnum, brt_search_t *search, BRT_
...
@@ -6242,6 +6243,7 @@ brt_search_child(BRT brt, BRTNODE node, int childnum, brt_search_t *search, BRT_
unlockers
,
unlockers
,
&
next_ancestors
,
bounds
,
&
next_ancestors
,
bounds
,
&
bfe
,
&
bfe
,
TRUE
,
&
childnode
);
&
childnode
);
if
(
rr
==
TOKUDB_TRY_AGAIN
)
return
rr
;
if
(
rr
==
TOKUDB_TRY_AGAIN
)
return
rr
;
assert
(
rr
==
0
);
assert
(
rr
==
0
);
...
@@ -6482,7 +6484,7 @@ toku_brt_search (BRT brt, brt_search_t *search, BRT_GET_CALLBACK_FUNCTION getf,
...
@@ -6482,7 +6484,7 @@ toku_brt_search (BRT brt, brt_search_t *search, BRT_GET_CALLBACK_FUNCTION getf,
brtcursor
->
left_is_neg_infty
,
brtcursor
->
left_is_neg_infty
,
brtcursor
->
right_is_pos_infty
brtcursor
->
right_is_pos_infty
);
);
r
=
toku_pin_brtnode
(
brt
,
*
rootp
,
fullhash
,(
UNLOCKERS
)
NULL
,(
ANCESTORS
)
NULL
,
&
infinite_bounds
,
&
bfe
,
&
node
);
r
=
toku_pin_brtnode
(
brt
,
*
rootp
,
fullhash
,(
UNLOCKERS
)
NULL
,(
ANCESTORS
)
NULL
,
&
infinite_bounds
,
&
bfe
,
TRUE
,
&
node
);
assert
(
r
==
0
||
r
==
TOKUDB_TRY_AGAIN
);
assert
(
r
==
0
||
r
==
TOKUDB_TRY_AGAIN
);
if
(
r
==
TOKUDB_TRY_AGAIN
)
{
if
(
r
==
TOKUDB_TRY_AGAIN
)
{
root_tries
++
;
root_tries
++
;
...
@@ -7036,7 +7038,7 @@ static int toku_brt_keyrange_internal (BRT brt, BRTNODE node,
...
@@ -7036,7 +7038,7 @@ static int toku_brt_keyrange_internal (BRT brt, BRTNODE node,
BLOCKNUM
childblocknum
=
BP_BLOCKNUM
(
node
,
child_number
);
BLOCKNUM
childblocknum
=
BP_BLOCKNUM
(
node
,
child_number
);
u_int32_t
fullhash
=
compute_child_fullhash
(
brt
->
cf
,
node
,
child_number
);
u_int32_t
fullhash
=
compute_child_fullhash
(
brt
->
cf
,
node
,
child_number
);
BRTNODE
childnode
;
BRTNODE
childnode
;
r
=
toku_pin_brtnode
(
brt
,
childblocknum
,
fullhash
,
unlockers
,
&
next_ancestors
,
bounds
,
bfe
,
&
childnode
);
r
=
toku_pin_brtnode
(
brt
,
childblocknum
,
fullhash
,
unlockers
,
&
next_ancestors
,
bounds
,
bfe
,
FALSE
,
&
childnode
);
if
(
r
!=
TOKUDB_TRY_AGAIN
)
{
if
(
r
!=
TOKUDB_TRY_AGAIN
)
{
assert
(
r
==
0
);
assert
(
r
==
0
);
struct
unlock_brtnode_extra
unlock_extra
=
{
brt
,
childnode
};
struct
unlock_brtnode_extra
unlock_extra
=
{
brt
,
childnode
};
...
@@ -7084,7 +7086,7 @@ int toku_brt_keyrange (BRT brt, DBT *key, u_int64_t *less_p, u_int64_t *equal_p,
...
@@ -7084,7 +7086,7 @@ int toku_brt_keyrange (BRT brt, DBT *key, u_int64_t *less_p, u_int64_t *equal_p,
BRTNODE
node
;
BRTNODE
node
;
{
{
int
r
=
toku_pin_brtnode
(
brt
,
*
rootp
,
fullhash
,(
UNLOCKERS
)
NULL
,(
ANCESTORS
)
NULL
,
&
infinite_bounds
,
&
bfe
,
&
node
);
int
r
=
toku_pin_brtnode
(
brt
,
*
rootp
,
fullhash
,(
UNLOCKERS
)
NULL
,(
ANCESTORS
)
NULL
,
&
infinite_bounds
,
&
bfe
,
FALSE
,
&
node
);
assert
(
r
==
0
||
r
==
TOKUDB_TRY_AGAIN
);
assert
(
r
==
0
||
r
==
TOKUDB_TRY_AGAIN
);
if
(
r
==
TOKUDB_TRY_AGAIN
)
{
if
(
r
==
TOKUDB_TRY_AGAIN
)
{
goto
try_again
;
goto
try_again
;
...
...
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