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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
d42d5fc8
Commit
d42d5fc8
authored
Jun 16, 2014
by
John Esmet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FT-275 Change toku::sort to return void
parent
9ace31b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
12 deletions
+6
-12
ft/ft_node-serialize.cc
ft/ft_node-serialize.cc
+5
-10
ft/node.cc
ft/node.cc
+1
-2
No files found.
ft/ft_node-serialize.cc
View file @
d42d5fc8
...
...
@@ -874,7 +874,6 @@ toku_serialize_ftnode_to (int fd, BLOCKNUM blocknum, FTNODE node, FTNODE_DISK_DA
static
void
deserialize_child_buffer_v26
(
NONLEAF_CHILDINFO
bnc
,
struct
rbuf
*
rbuf
,
const
toku
::
comparator
&
cmp
)
{
int
r
;
int
n_in_this_buffer
=
rbuf_int
(
rbuf
);
int32_t
*
fresh_offsets
=
nullptr
,
*
stale_offsets
=
nullptr
;
int32_t
*
broadcast_offsets
=
nullptr
;
...
...
@@ -937,12 +936,10 @@ deserialize_child_buffer_v26(NONLEAF_CHILDINFO bnc, struct rbuf *rbuf, const tok
if
(
sort_buffers
)
{
struct
toku_msg_buffer_key_msn_cmp_extra
extra
(
cmp
,
&
bnc
->
msg_buffer
);
r
=
toku
::
sort
<
int32_t
,
const
struct
toku_msg_buffer_key_msn_cmp_extra
,
toku_msg_buffer_key_msn_cmp
>::
mergesort_r
(
fresh_offsets
,
nfresh
,
extra
);
assert_zero
(
r
);
toku
::
sort
<
int32_t
,
const
struct
toku_msg_buffer_key_msn_cmp_extra
,
toku_msg_buffer_key_msn_cmp
>::
mergesort_r
(
fresh_offsets
,
nfresh
,
extra
);
bnc
->
fresh_message_tree
.
destroy
();
bnc
->
fresh_message_tree
.
create_steal_sorted_array
(
&
fresh_offsets
,
nfresh
,
n_in_this_buffer
);
r
=
toku
::
sort
<
int32_t
,
const
struct
toku_msg_buffer_key_msn_cmp_extra
,
toku_msg_buffer_key_msn_cmp
>::
mergesort_r
(
stale_offsets
,
nstale
,
extra
);
assert_zero
(
r
);
toku
::
sort
<
int32_t
,
const
struct
toku_msg_buffer_key_msn_cmp_extra
,
toku_msg_buffer_key_msn_cmp
>::
mergesort_r
(
stale_offsets
,
nstale
,
extra
);
bnc
->
stale_message_tree
.
destroy
();
bnc
->
stale_message_tree
.
create_steal_sorted_array
(
&
stale_offsets
,
nstale
,
n_in_this_buffer
);
bnc
->
broadcast_list
.
destroy
();
...
...
@@ -1688,10 +1685,9 @@ deserialize_and_upgrade_internal_node(FTNODE node,
struct
ftnode_fetch_extra
*
bfe
,
STAT64INFO
info
)
{
int
r
=
0
;
int
version
=
node
->
layout_version_read_from_disk
;
if
(
version
==
FT_LAST_LAYOUT_VERSION_WITH_FINGERPRINT
)
{
if
(
version
==
FT_LAST_LAYOUT_VERSION_WITH_FINGERPRINT
)
{
(
void
)
rbuf_int
(
rb
);
// 10. fingerprint
}
...
...
@@ -1837,8 +1833,7 @@ deserialize_and_upgrade_internal_node(FTNODE node,
if
(
sort_buffers
)
{
struct
toku_msg_buffer_key_msn_cmp_extra
extra
(
bfe
->
ft
->
cmp
,
&
bnc
->
msg_buffer
);
typedef
toku
::
sort
<
int32_t
,
const
struct
toku_msg_buffer_key_msn_cmp_extra
,
toku_msg_buffer_key_msn_cmp
>
key_msn_sort
;
r
=
key_msn_sort
::
mergesort_r
(
fresh_offsets
,
nfresh
,
extra
);
assert_zero
(
r
);
key_msn_sort
::
mergesort_r
(
fresh_offsets
,
nfresh
,
extra
);
bnc
->
fresh_message_tree
.
destroy
();
bnc
->
fresh_message_tree
.
create_steal_sorted_array
(
&
fresh_offsets
,
nfresh
,
n_in_this_buffer
);
bnc
->
broadcast_list
.
destroy
();
...
...
@@ -1870,7 +1865,7 @@ deserialize_and_upgrade_internal_node(FTNODE node,
}
}
return
r
;
return
0
;
}
// This function takes a deserialized version 13 or 14 buffer and
...
...
ft/node.cc
View file @
d42d5fc8
...
...
@@ -601,8 +601,7 @@ bnc_apply_messages_to_basement_node(
invariant
(
sfo_extra
.
i
==
buffer_size
);
// Sort by MSN.
r
=
toku
::
sort
<
int32_t
,
message_buffer
,
msg_buffer_offset_msn_cmp
>::
mergesort_r
(
offsets
,
buffer_size
,
bnc
->
msg_buffer
);
assert_zero
(
r
);
toku
::
sort
<
int32_t
,
message_buffer
,
msg_buffer_offset_msn_cmp
>::
mergesort_r
(
offsets
,
buffer_size
,
bnc
->
msg_buffer
);
// Apply the messages in MSN order.
for
(
int
i
=
0
;
i
<
buffer_size
;
++
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