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
65e31f4a
Commit
65e31f4a
authored
Oct 14, 2011
by
Zardosht Kasheff
Committed by
Yoni Fogel
Apr 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[t:3972], fix for crash
git-svn-id:
file:///svn/toku/tokudb@35723
c7de825b-a66e-492c-adef-691d508d4ae1
parent
2e45443e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
newbrt/brt-internal.h
newbrt/brt-internal.h
+1
-1
newbrt/brt.c
newbrt/brt.c
+7
-6
No files found.
newbrt/brt-internal.h
View file @
65e31f4a
...
...
@@ -691,7 +691,7 @@ int toku_pin_brtnode (BRT brt, BLOCKNUM blocknum, u_int32_t fullhash,
__attribute__
((
__warn_unused_result__
));
void
toku_pin_brtnode_holding_lock
(
BRT
brt
,
BLOCKNUM
blocknum
,
u_int32_t
fullhash
,
ANCESTORS
ancestors
,
struct
pivot_bounds
const
*
const
pbounds
,
struct
brtnode_fetch_extra
*
bfe
,
struct
brtnode_fetch_extra
*
bfe
,
BOOL
apply_ancestor_messages
,
BRTNODE
*
node_p
);
void
toku_unpin_brtnode
(
BRT
brt
,
BRTNODE
node
);
unsigned
int
toku_brtnode_which_child
(
BRTNODE
node
,
const
DBT
*
k
,
...
...
newbrt/brt.c
View file @
65e31f4a
...
...
@@ -307,7 +307,8 @@ int toku_pin_brtnode (BRT brt, BLOCKNUM blocknum, u_int32_t fullhash,
// see comments for toku_pin_brtnode
void
toku_pin_brtnode_holding_lock
(
BRT
brt
,
BLOCKNUM
blocknum
,
u_int32_t
fullhash
,
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
)
{
void
*
node_v
;
int
r
=
toku_cachetable_get_and_pin
(
...
...
@@ -327,7 +328,7 @@ void toku_pin_brtnode_holding_lock (BRT brt, BLOCKNUM blocknum, u_int32_t fullha
);
assert
(
r
==
0
);
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
;
}
...
...
@@ -547,7 +548,7 @@ toku_verify_estimates (BRT t, BRTNODE node, ANCESTORS ancestors, struct pivot_bo
BRTNODE
childnode
;
struct
brtnode_fetch_extra
bfe
;
fill_bfe_for_full_read
(
&
bfe
,
t
->
h
,
t
->
db
,
t
->
compare_fun
);
toku_pin_brtnode_holding_lock
(
t
,
childblocknum
,
fullhash
,
&
next_ancestors
,
&
next_bounds
,
&
bfe
,
&
childnode
);
toku_pin_brtnode_holding_lock
(
t
,
childblocknum
,
fullhash
,
&
next_ancestors
,
&
next_bounds
,
&
bfe
,
TRUE
,
&
childnode
);
for
(
int
i
=
0
;
i
<
childnode
->
n_children
;
i
++
)
{
child_estimate
+=
BP_SUBTREE_EST
(
childnode
,
i
).
ndata
;
}
...
...
@@ -3592,7 +3593,7 @@ 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
,
brt
->
db
,
brt
->
compare_fun
);
toku_pin_brtnode_holding_lock
(
brt
,
*
rootp
,
fullhash
,(
ANCESTORS
)
NULL
,
&
infinite_bounds
,
&
bfe
,
&
node
);
toku_pin_brtnode_holding_lock
(
brt
,
*
rootp
,
fullhash
,(
ANCESTORS
)
NULL
,
&
infinite_bounds
,
&
bfe
,
TRUE
,
&
node
);
toku_assert_entire_node_in_memory
(
node
);
cmd
->
msn
.
msn
=
node
->
max_msn_applied_to_node_on_disk
.
msn
+
1
;
...
...
@@ -6701,7 +6702,7 @@ static void toku_brt_keyrange_internal (BRT brt, CACHEKEY nodename,
struct
brtnode_fetch_extra
bfe
;
fill_bfe_for_min_read
(
&
bfe
,
brt
->
h
,
brt
->
db
,
brt
->
compare_fun
);
toku_pin_brtnode_holding_lock
(
brt
,
nodename
,
fullhash
,
ancestors
,
bounds
,
&
bfe
,
ancestors
,
bounds
,
&
bfe
,
FALSE
,
&
node
);
assert
(
node
->
fullhash
==
fullhash
);
}
...
...
@@ -6789,7 +6790,7 @@ int toku_brt_stat64 (BRT brt, TOKUTXN UU(txn), struct brtstat64_s *s) {
struct
brtnode_fetch_extra
bfe
;
fill_bfe_for_min_read
(
&
bfe
,
brt
->
h
,
brt
->
db
,
brt
->
compare_fun
);
BRTNODE
node
;
toku_pin_brtnode_holding_lock
(
brt
,
root
,
fullhash
,
(
ANCESTORS
)
NULL
,
&
infinite_bounds
,
&
bfe
,
&
node
);
toku_pin_brtnode_holding_lock
(
brt
,
root
,
fullhash
,
(
ANCESTORS
)
NULL
,
&
infinite_bounds
,
&
bfe
,
FALSE
,
&
node
);
s
->
nkeys
=
s
->
ndata
=
s
->
dsize
=
0
;
int
i
;
...
...
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