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
291dfdc9
Commit
291dfdc9
authored
Jun 14, 2014
by
John Esmet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FT-262 Rename thisnodename or nodename to blocknum
parent
b6abf206
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
80 additions
and
80 deletions
+80
-80
ft/ft-cachetable-wrappers.cc
ft/ft-cachetable-wrappers.cc
+3
-3
ft/ft-flusher.cc
ft/ft-flusher.cc
+13
-13
ft/ft-internal.h
ft/ft-internal.h
+2
-2
ft/ft-node-deserialize.cc
ft/ft-node-deserialize.cc
+1
-1
ft/ft-ops.cc
ft/ft-ops.cc
+17
-17
ft/ft-test-helpers.cc
ft/ft-test-helpers.cc
+2
-2
ft/ft-verify.cc
ft/ft-verify.cc
+2
-2
ft/ft_node-serialize.cc
ft/ft_node-serialize.cc
+3
-3
ft/node.cc
ft/node.cc
+3
-3
ft/node.h
ft/node.h
+2
-2
ft/tests/ft-bfe-query.cc
ft/tests/ft-bfe-query.cc
+1
-1
ft/tests/ft-clock-test.cc
ft/tests/ft-clock-test.cc
+2
-2
ft/tests/ft-serialize-benchmark.cc
ft/tests/ft-serialize-benchmark.cc
+2
-2
ft/tests/ft-serialize-test.cc
ft/tests/ft-serialize-test.cc
+14
-14
ft/tests/make-tree.cc
ft/tests/make-tree.cc
+1
-1
ft/tests/mempool-115.cc
ft/tests/mempool-115.cc
+1
-1
ft/tests/msnfilter.cc
ft/tests/msnfilter.cc
+1
-1
ft/tests/test3884.cc
ft/tests/test3884.cc
+1
-1
ft/tests/test_rightmost_leaf_split_merge.cc
ft/tests/test_rightmost_leaf_split_merge.cc
+1
-1
ft/tests/verify-bad-msn.cc
ft/tests/verify-bad-msn.cc
+1
-1
ft/tests/verify-bad-pivots.cc
ft/tests/verify-bad-pivots.cc
+1
-1
ft/tests/verify-dup-in-leaf.cc
ft/tests/verify-dup-in-leaf.cc
+1
-1
ft/tests/verify-dup-pivots.cc
ft/tests/verify-dup-pivots.cc
+1
-1
ft/tests/verify-misrouted-msgs.cc
ft/tests/verify-misrouted-msgs.cc
+1
-1
ft/tests/verify-unsorted-leaf.cc
ft/tests/verify-unsorted-leaf.cc
+1
-1
ft/tests/verify-unsorted-pivots.cc
ft/tests/verify-unsorted-pivots.cc
+1
-1
ft/tokuftdump.cc
ft/tokuftdump.cc
+1
-1
No files found.
ft/ft-cachetable-wrappers.cc
View file @
291dfdc9
...
@@ -409,15 +409,15 @@ void toku_ftnode_swap_pair_values(FTNODE a, FTNODE b)
...
@@ -409,15 +409,15 @@ void toku_ftnode_swap_pair_values(FTNODE a, FTNODE b)
// Effect: Swap the blocknum, fullhash, and PAIR for for a and b
// Effect: Swap the blocknum, fullhash, and PAIR for for a and b
// Requires: Both nodes are pinned
// Requires: Both nodes are pinned
{
{
BLOCKNUM
tmp_blocknum
=
a
->
thisnodename
;
BLOCKNUM
tmp_blocknum
=
a
->
blocknum
;
uint32_t
tmp_fullhash
=
a
->
fullhash
;
uint32_t
tmp_fullhash
=
a
->
fullhash
;
PAIR
tmp_pair
=
a
->
ct_pair
;
PAIR
tmp_pair
=
a
->
ct_pair
;
a
->
thisnodename
=
b
->
thisnodename
;
a
->
blocknum
=
b
->
blocknum
;
a
->
fullhash
=
b
->
fullhash
;
a
->
fullhash
=
b
->
fullhash
;
a
->
ct_pair
=
b
->
ct_pair
;
a
->
ct_pair
=
b
->
ct_pair
;
b
->
thisnodename
=
tmp_blocknum
;
b
->
blocknum
=
tmp_blocknum
;
b
->
fullhash
=
tmp_fullhash
;
b
->
fullhash
=
tmp_fullhash
;
b
->
ct_pair
=
tmp_pair
;
b
->
ct_pair
=
tmp_pair
;
...
...
ft/ft-flusher.cc
View file @
291dfdc9
...
@@ -606,21 +606,21 @@ handle_split_of_child(
...
@@ -606,21 +606,21 @@ handle_split_of_child(
memset
(
&
node
->
bp
[
childnum
+
1
],
0
,
sizeof
(
node
->
bp
[
0
]));
memset
(
&
node
->
bp
[
childnum
+
1
],
0
,
sizeof
(
node
->
bp
[
0
]));
node
->
n_children
++
;
node
->
n_children
++
;
paranoid_invariant
(
BP_BLOCKNUM
(
node
,
childnum
).
b
==
childa
->
thisnodename
.
b
);
// use the same child
paranoid_invariant
(
BP_BLOCKNUM
(
node
,
childnum
).
b
==
childa
->
blocknum
.
b
);
// use the same child
// We never set the rightmost blocknum to be the root.
// We never set the rightmost blocknum to be the root.
// Instead, we wait for the root to split and let promotion initialize the rightmost
// Instead, we wait for the root to split and let promotion initialize the rightmost
// blocknum to be the first non-root leaf node on the right extreme to recieve an insert.
// blocknum to be the first non-root leaf node on the right extreme to recieve an insert.
invariant
(
ft
->
h
->
root_blocknum
.
b
!=
ft
->
rightmost_blocknum
.
b
);
invariant
(
ft
->
h
->
root_blocknum
.
b
!=
ft
->
rightmost_blocknum
.
b
);
if
(
childa
->
thisnodename
.
b
==
ft
->
rightmost_blocknum
.
b
)
{
if
(
childa
->
blocknum
.
b
==
ft
->
rightmost_blocknum
.
b
)
{
// The rightmost leaf (a) split into (a) and (b). We want (b) to swap pair values
// The rightmost leaf (a) split into (a) and (b). We want (b) to swap pair values
// with (a), now that it is the new rightmost leaf. This keeps the rightmost blocknum
// with (a), now that it is the new rightmost leaf. This keeps the rightmost blocknum
// constant, the same the way we keep the root blocknum constant.
// constant, the same the way we keep the root blocknum constant.
toku_ftnode_swap_pair_values
(
childa
,
childb
);
toku_ftnode_swap_pair_values
(
childa
,
childb
);
BP_BLOCKNUM
(
node
,
childnum
)
=
childa
->
thisnodename
;
BP_BLOCKNUM
(
node
,
childnum
)
=
childa
->
blocknum
;
}
}
BP_BLOCKNUM
(
node
,
childnum
+
1
)
=
childb
->
thisnodename
;
BP_BLOCKNUM
(
node
,
childnum
+
1
)
=
childb
->
blocknum
;
BP_WORKDONE
(
node
,
childnum
+
1
)
=
0
;
BP_WORKDONE
(
node
,
childnum
+
1
)
=
0
;
BP_STATE
(
node
,
childnum
+
1
)
=
PT_AVAIL
;
BP_STATE
(
node
,
childnum
+
1
)
=
PT_AVAIL
;
...
@@ -1120,8 +1120,8 @@ static void bring_node_fully_into_memory(FTNODE node, FT ft) {
...
@@ -1120,8 +1120,8 @@ static void bring_node_fully_into_memory(FTNODE node, FT ft) {
toku_ftnode_pf_callback
,
toku_ftnode_pf_callback
,
&
bfe
,
&
bfe
,
ft
->
cf
,
ft
->
cf
,
node
->
thisnodename
,
node
->
blocknum
,
toku_cachetable_hash
(
ft
->
cf
,
node
->
thisnodename
)
toku_cachetable_hash
(
ft
->
cf
,
node
->
blocknum
)
);
);
}
}
}
}
...
@@ -1143,7 +1143,7 @@ flush_this_child(
...
@@ -1143,7 +1143,7 @@ flush_this_child(
bring_node_fully_into_memory
(
child
,
h
);
bring_node_fully_into_memory
(
child
,
h
);
toku_ftnode_assert_fully_in_memory
(
child
);
toku_ftnode_assert_fully_in_memory
(
child
);
paranoid_invariant
(
node
->
height
>
0
);
paranoid_invariant
(
node
->
height
>
0
);
paranoid_invariant
(
child
->
thisnodename
.
b
!=
0
);
paranoid_invariant
(
child
->
blocknum
.
b
!=
0
);
// VERIFY_NODE does not work off client thread as of now
// VERIFY_NODE does not work off client thread as of now
//VERIFY_NODE(t, child);
//VERIFY_NODE(t, child);
node
->
dirty
=
1
;
node
->
dirty
=
1
;
...
@@ -1504,13 +1504,13 @@ ft_merge_child(
...
@@ -1504,13 +1504,13 @@ ft_merge_child(
REALLOC_N
(
node
->
n_children
-
1
,
node
->
childkeys
);
REALLOC_N
(
node
->
n_children
-
1
,
node
->
childkeys
);
// Handle a merge of the rightmost leaf node.
// Handle a merge of the rightmost leaf node.
if
(
did_merge
&&
childb
->
thisnodename
.
b
==
h
->
rightmost_blocknum
.
b
)
{
if
(
did_merge
&&
childb
->
blocknum
.
b
==
h
->
rightmost_blocknum
.
b
)
{
invariant
(
childb
->
thisnodename
.
b
!=
h
->
h
->
root_blocknum
.
b
);
invariant
(
childb
->
blocknum
.
b
!=
h
->
h
->
root_blocknum
.
b
);
toku_ftnode_swap_pair_values
(
childa
,
childb
);
toku_ftnode_swap_pair_values
(
childa
,
childb
);
BP_BLOCKNUM
(
node
,
childnuma
)
=
childa
->
thisnodename
;
BP_BLOCKNUM
(
node
,
childnuma
)
=
childa
->
blocknum
;
}
}
paranoid_invariant
(
BP_BLOCKNUM
(
node
,
childnuma
).
b
==
childa
->
thisnodename
.
b
);
paranoid_invariant
(
BP_BLOCKNUM
(
node
,
childnuma
).
b
==
childa
->
blocknum
.
b
);
childa
->
dirty
=
1
;
// just to make sure
childa
->
dirty
=
1
;
// just to make sure
childb
->
dirty
=
1
;
// just to make sure
childb
->
dirty
=
1
;
// just to make sure
}
else
{
}
else
{
...
@@ -1610,7 +1610,7 @@ void toku_ft_flush_some_child(FT ft, FTNODE parent, struct flusher_advice *fa)
...
@@ -1610,7 +1610,7 @@ void toku_ft_flush_some_child(FT ft, FTNODE parent, struct flusher_advice *fa)
// the parent before finishing reading in the entire child node.
// the parent before finishing reading in the entire child node.
bool
may_child_be_reactive
=
ft_ftnode_may_be_reactive
(
ft
,
child
);
bool
may_child_be_reactive
=
ft_ftnode_may_be_reactive
(
ft
,
child
);
paranoid_invariant
(
child
->
thisnodename
.
b
!=
0
);
paranoid_invariant
(
child
->
blocknum
.
b
!=
0
);
// only do the following work if there is a flush to perform
// only do the following work if there is a flush to perform
if
(
toku_bnc_n_entries
(
BNC
(
parent
,
childnum
))
>
0
||
parent
->
height
==
1
)
{
if
(
toku_bnc_n_entries
(
BNC
(
parent
,
childnum
))
>
0
||
parent
->
height
==
1
)
{
...
@@ -1914,7 +1914,7 @@ toku_ftnode_cleaner_callback(
...
@@ -1914,7 +1914,7 @@ toku_ftnode_cleaner_callback(
void
*
extraargs
)
void
*
extraargs
)
{
{
FTNODE
node
=
(
FTNODE
)
ftnode_pv
;
FTNODE
node
=
(
FTNODE
)
ftnode_pv
;
invariant
(
node
->
thisnodename
.
b
==
blocknum
.
b
);
invariant
(
node
->
blocknum
.
b
==
blocknum
.
b
);
invariant
(
node
->
fullhash
==
fullhash
);
invariant
(
node
->
fullhash
==
fullhash
);
invariant
(
node
->
height
>
0
);
// we should never pick a leaf node (for now at least)
invariant
(
node
->
height
>
0
);
// we should never pick a leaf node (for now at least)
FT
h
=
(
FT
)
extraargs
;
FT
h
=
(
FT
)
extraargs
;
...
...
ft/ft-internal.h
View file @
291dfdc9
...
@@ -302,8 +302,8 @@ PAIR_ATTR make_invalid_pair_attr(void);
...
@@ -302,8 +302,8 @@ PAIR_ATTR make_invalid_pair_attr(void);
// Cachetable callbacks for ftnodes.
// Cachetable callbacks for ftnodes.
void
toku_ftnode_clone_callback
(
void
*
value_data
,
void
**
cloned_value_data
,
long
*
clone_size
,
PAIR_ATTR
*
new_attr
,
bool
for_checkpoint
,
void
*
write_extraargs
);
void
toku_ftnode_clone_callback
(
void
*
value_data
,
void
**
cloned_value_data
,
long
*
clone_size
,
PAIR_ATTR
*
new_attr
,
bool
for_checkpoint
,
void
*
write_extraargs
);
void
toku_ftnode_checkpoint_complete_callback
(
void
*
value_data
);
void
toku_ftnode_checkpoint_complete_callback
(
void
*
value_data
);
void
toku_ftnode_flush_callback
(
CACHEFILE
cachefile
,
int
fd
,
BLOCKNUM
nodename
,
void
*
ftnode_v
,
void
**
UU
(
disk_data
),
void
*
extraargs
,
PAIR_ATTR
size
,
PAIR_ATTR
*
new_size
,
bool
write_me
,
bool
keep_me
,
bool
for_checkpoint
,
bool
is_clone
);
void
toku_ftnode_flush_callback
(
CACHEFILE
cachefile
,
int
fd
,
BLOCKNUM
blocknum
,
void
*
ftnode_v
,
void
**
UU
(
disk_data
),
void
*
extraargs
,
PAIR_ATTR
size
,
PAIR_ATTR
*
new_size
,
bool
write_me
,
bool
keep_me
,
bool
for_checkpoint
,
bool
is_clone
);
int
toku_ftnode_fetch_callback
(
CACHEFILE
cachefile
,
PAIR
p
,
int
fd
,
BLOCKNUM
nodename
,
uint32_t
fullhash
,
void
**
ftnode_pv
,
void
**
UU
(
disk_data
),
PAIR_ATTR
*
sizep
,
int
*
dirty
,
void
*
extraargs
);
int
toku_ftnode_fetch_callback
(
CACHEFILE
cachefile
,
PAIR
p
,
int
fd
,
BLOCKNUM
blocknum
,
uint32_t
fullhash
,
void
**
ftnode_pv
,
void
**
UU
(
disk_data
),
PAIR_ATTR
*
sizep
,
int
*
dirty
,
void
*
extraargs
);
void
toku_ftnode_pe_est_callback
(
void
*
ftnode_pv
,
void
*
disk_data
,
long
*
bytes_freed_estimate
,
enum
partial_eviction_cost
*
cost
,
void
*
write_extraargs
);
void
toku_ftnode_pe_est_callback
(
void
*
ftnode_pv
,
void
*
disk_data
,
long
*
bytes_freed_estimate
,
enum
partial_eviction_cost
*
cost
,
void
*
write_extraargs
);
int
toku_ftnode_pe_callback
(
void
*
ftnode_pv
,
PAIR_ATTR
old_attr
,
void
*
extraargs
,
int
toku_ftnode_pe_callback
(
void
*
ftnode_pv
,
PAIR_ATTR
old_attr
,
void
*
extraargs
,
void
(
*
finalize
)(
PAIR_ATTR
new_attr
,
void
*
extra
),
void
*
finalize_extra
);
void
(
*
finalize
)(
PAIR_ATTR
new_attr
,
void
*
extra
),
void
*
finalize_extra
);
...
...
ft/ft-node-deserialize.cc
View file @
291dfdc9
...
@@ -111,7 +111,7 @@ void
...
@@ -111,7 +111,7 @@ void
initialize_ftnode
(
FTNODE
node
,
BLOCKNUM
blocknum
)
initialize_ftnode
(
FTNODE
node
,
BLOCKNUM
blocknum
)
{
{
node
->
fullhash
=
0xDEADBEEF
;
// <CER> Is this 'spoof' ok?
node
->
fullhash
=
0xDEADBEEF
;
// <CER> Is this 'spoof' ok?
node
->
thisnodename
=
blocknum
;
node
->
blocknum
=
blocknum
;
node
->
dirty
=
0
;
node
->
dirty
=
0
;
node
->
bp
=
NULL
;
node
->
bp
=
NULL
;
// <CER> Can we use this initialization as a correctness assert in
// <CER> Can we use this initialization as a correctness assert in
...
...
ft/ft-ops.cc
View file @
291dfdc9
...
@@ -713,7 +713,7 @@ void toku_ftnode_clone_callback(
...
@@ -713,7 +713,7 @@ void toku_ftnode_clone_callback(
cloned_node
->
oldest_referenced_xid_known
=
node
->
oldest_referenced_xid_known
;
cloned_node
->
oldest_referenced_xid_known
=
node
->
oldest_referenced_xid_known
;
cloned_node
->
max_msn_applied_to_node_on_disk
=
node
->
max_msn_applied_to_node_on_disk
;
cloned_node
->
max_msn_applied_to_node_on_disk
=
node
->
max_msn_applied_to_node_on_disk
;
cloned_node
->
flags
=
node
->
flags
;
cloned_node
->
flags
=
node
->
flags
;
cloned_node
->
thisnodename
=
node
->
thisnodename
;
cloned_node
->
blocknum
=
node
->
blocknum
;
cloned_node
->
layout_version
=
node
->
layout_version
;
cloned_node
->
layout_version
=
node
->
layout_version
;
cloned_node
->
layout_version_original
=
node
->
layout_version_original
;
cloned_node
->
layout_version_original
=
node
->
layout_version_original
;
cloned_node
->
layout_version_read_from_disk
=
node
->
layout_version_read_from_disk
;
cloned_node
->
layout_version_read_from_disk
=
node
->
layout_version_read_from_disk
;
...
@@ -756,7 +756,7 @@ void toku_ftnode_clone_callback(
...
@@ -756,7 +756,7 @@ void toku_ftnode_clone_callback(
void
toku_ftnode_flush_callback
(
void
toku_ftnode_flush_callback
(
CACHEFILE
UU
(
cachefile
),
CACHEFILE
UU
(
cachefile
),
int
fd
,
int
fd
,
BLOCKNUM
nodename
,
BLOCKNUM
blocknum
,
void
*
ftnode_v
,
void
*
ftnode_v
,
void
**
disk_data
,
void
**
disk_data
,
void
*
extraargs
,
void
*
extraargs
,
...
@@ -771,7 +771,7 @@ void toku_ftnode_flush_callback(
...
@@ -771,7 +771,7 @@ void toku_ftnode_flush_callback(
FT
h
=
(
FT
)
extraargs
;
FT
h
=
(
FT
)
extraargs
;
FTNODE
ftnode
=
(
FTNODE
)
ftnode_v
;
FTNODE
ftnode
=
(
FTNODE
)
ftnode_v
;
FTNODE_DISK_DATA
*
ndd
=
(
FTNODE_DISK_DATA
*
)
disk_data
;
FTNODE_DISK_DATA
*
ndd
=
(
FTNODE_DISK_DATA
*
)
disk_data
;
assert
(
ftnode
->
thisnodename
.
b
==
nodename
.
b
);
assert
(
ftnode
->
blocknum
.
b
==
blocknum
.
b
);
int
height
=
ftnode
->
height
;
int
height
=
ftnode
->
height
;
if
(
write_me
)
{
if
(
write_me
)
{
toku_ftnode_assert_fully_in_memory
(
ftnode
);
toku_ftnode_assert_fully_in_memory
(
ftnode
);
...
@@ -784,7 +784,7 @@ void toku_ftnode_flush_callback(
...
@@ -784,7 +784,7 @@ void toku_ftnode_flush_callback(
toku_ftnode_update_disk_stats
(
ftnode
,
h
,
for_checkpoint
);
toku_ftnode_update_disk_stats
(
ftnode
,
h
,
for_checkpoint
);
}
}
}
}
int
r
=
toku_serialize_ftnode_to
(
fd
,
ftnode
->
thisnodename
,
ftnode
,
ndd
,
!
is_clone
,
h
,
for_checkpoint
);
int
r
=
toku_serialize_ftnode_to
(
fd
,
ftnode
->
blocknum
,
ftnode
,
ndd
,
!
is_clone
,
h
,
for_checkpoint
);
assert_zero
(
r
);
assert_zero
(
r
);
ftnode
->
layout_version_read_from_disk
=
FT_LAYOUT_VERSION
;
ftnode
->
layout_version_read_from_disk
=
FT_LAYOUT_VERSION
;
}
}
...
@@ -835,7 +835,7 @@ toku_ft_status_update_pivot_fetch_reason(struct ftnode_fetch_extra *bfe)
...
@@ -835,7 +835,7 @@ toku_ft_status_update_pivot_fetch_reason(struct ftnode_fetch_extra *bfe)
}
}
}
}
int
toku_ftnode_fetch_callback
(
CACHEFILE
UU
(
cachefile
),
PAIR
p
,
int
fd
,
BLOCKNUM
nodename
,
uint32_t
fullhash
,
int
toku_ftnode_fetch_callback
(
CACHEFILE
UU
(
cachefile
),
PAIR
p
,
int
fd
,
BLOCKNUM
blocknum
,
uint32_t
fullhash
,
void
**
ftnode_pv
,
void
**
disk_data
,
PAIR_ATTR
*
sizep
,
int
*
dirtyp
,
void
*
extraargs
)
{
void
**
ftnode_pv
,
void
**
disk_data
,
PAIR_ATTR
*
sizep
,
int
*
dirtyp
,
void
*
extraargs
)
{
assert
(
extraargs
);
assert
(
extraargs
);
assert
(
*
ftnode_pv
==
NULL
);
assert
(
*
ftnode_pv
==
NULL
);
...
@@ -845,7 +845,7 @@ int toku_ftnode_fetch_callback (CACHEFILE UU(cachefile), PAIR p, int fd, BLOCKNU
...
@@ -845,7 +845,7 @@ int toku_ftnode_fetch_callback (CACHEFILE UU(cachefile), PAIR p, int fd, BLOCKNU
// deserialize the node, must pass the bfe in because we cannot
// deserialize the node, must pass the bfe in because we cannot
// evaluate what piece of the the node is necessary until we get it at
// evaluate what piece of the the node is necessary until we get it at
// least partially into memory
// least partially into memory
int
r
=
toku_deserialize_ftnode_from
(
fd
,
nodename
,
fullhash
,
node
,
ndd
,
bfe
);
int
r
=
toku_deserialize_ftnode_from
(
fd
,
blocknum
,
fullhash
,
node
,
ndd
,
bfe
);
if
(
r
!=
0
)
{
if
(
r
!=
0
)
{
if
(
r
==
TOKUDB_BAD_CHECKSUM
)
{
if
(
r
==
TOKUDB_BAD_CHECKSUM
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
...
@@ -1497,7 +1497,7 @@ ft_init_new_root(FT ft, FTNODE oldroot, FTNODE *newrootp)
...
@@ -1497,7 +1497,7 @@ ft_init_new_root(FT ft, FTNODE oldroot, FTNODE *newrootp)
{
{
FTNODE
newroot
;
FTNODE
newroot
;
BLOCKNUM
old_blocknum
=
oldroot
->
thisnodename
;
BLOCKNUM
old_blocknum
=
oldroot
->
blocknum
;
uint32_t
old_fullhash
=
oldroot
->
fullhash
;
uint32_t
old_fullhash
=
oldroot
->
fullhash
;
int
new_height
=
oldroot
->
height
+
1
;
int
new_height
=
oldroot
->
height
+
1
;
...
@@ -1637,7 +1637,7 @@ static void inject_message_in_locked_node(
...
@@ -1637,7 +1637,7 @@ static void inject_message_in_locked_node(
// verify that msn of latest message was captured in root node
// verify that msn of latest message was captured in root node
paranoid_invariant
(
msg
->
msn
.
msn
==
node
->
max_msn_applied_to_node_on_disk
.
msn
);
paranoid_invariant
(
msg
->
msn
.
msn
==
node
->
max_msn_applied_to_node_on_disk
.
msn
);
if
(
node
->
thisnodename
.
b
==
ft
->
rightmost_blocknum
.
b
)
{
if
(
node
->
blocknum
.
b
==
ft
->
rightmost_blocknum
.
b
)
{
if
(
ft
->
seqinsert_score
<
FT_SEQINSERT_SCORE_THRESHOLD
)
{
if
(
ft
->
seqinsert_score
<
FT_SEQINSERT_SCORE_THRESHOLD
)
{
// we promoted to the rightmost leaf node and the seqinsert score has not yet saturated.
// we promoted to the rightmost leaf node and the seqinsert score has not yet saturated.
toku_sync_fetch_and_add
(
&
ft
->
seqinsert_score
,
1
);
toku_sync_fetch_and_add
(
&
ft
->
seqinsert_score
,
1
);
...
@@ -1684,7 +1684,7 @@ static bool process_maybe_reactive_child(FT ft, FTNODE parent, FTNODE child, int
...
@@ -1684,7 +1684,7 @@ static bool process_maybe_reactive_child(FT ft, FTNODE parent, FTNODE child, int
case
RE_FISSIBLE
:
case
RE_FISSIBLE
:
{
{
// We only have a read lock on the parent. We need to drop both locks, and get write locks.
// We only have a read lock on the parent. We need to drop both locks, and get write locks.
BLOCKNUM
parent_blocknum
=
parent
->
thisnodename
;
BLOCKNUM
parent_blocknum
=
parent
->
blocknum
;
uint32_t
parent_fullhash
=
toku_cachetable_hash
(
ft
->
cf
,
parent_blocknum
);
uint32_t
parent_fullhash
=
toku_cachetable_hash
(
ft
->
cf
,
parent_blocknum
);
int
parent_height
=
parent
->
height
;
int
parent_height
=
parent
->
height
;
int
parent_n_children
=
parent
->
n_children
;
int
parent_n_children
=
parent
->
n_children
;
...
@@ -1738,7 +1738,7 @@ static bool process_maybe_reactive_child(FT ft, FTNODE parent, FTNODE child, int
...
@@ -1738,7 +1738,7 @@ static bool process_maybe_reactive_child(FT ft, FTNODE parent, FTNODE child, int
}
}
int
parent_height
=
parent
->
height
;
int
parent_height
=
parent
->
height
;
BLOCKNUM
parent_blocknum
=
parent
->
thisnodename
;
BLOCKNUM
parent_blocknum
=
parent
->
blocknum
;
uint32_t
parent_fullhash
=
toku_cachetable_hash
(
ft
->
cf
,
parent_blocknum
);
uint32_t
parent_fullhash
=
toku_cachetable_hash
(
ft
->
cf
,
parent_blocknum
);
toku_unpin_ftnode_read_only
(
ft
,
child
);
toku_unpin_ftnode_read_only
(
ft
,
child
);
toku_unpin_ftnode_read_only
(
ft
,
parent
);
toku_unpin_ftnode_read_only
(
ft
,
parent
);
...
@@ -1876,8 +1876,8 @@ static void push_something_in_subtree(
...
@@ -1876,8 +1876,8 @@ static void push_something_in_subtree(
// because promotion would not chose to inject directly into this leaf
// because promotion would not chose to inject directly into this leaf
// otherwise. We explicitly skip the root node because then we don't have
// otherwise. We explicitly skip the root node because then we don't have
// to worry about changing the rightmost blocknum when the root splits.
// to worry about changing the rightmost blocknum when the root splits.
if
(
subtree_root
->
height
==
0
&&
loc
==
RIGHT_EXTREME
&&
subtree_root
->
thisnodename
.
b
!=
ft
->
h
->
root_blocknum
.
b
)
{
if
(
subtree_root
->
height
==
0
&&
loc
==
RIGHT_EXTREME
&&
subtree_root
->
blocknum
.
b
!=
ft
->
h
->
root_blocknum
.
b
)
{
ft_set_or_verify_rightmost_blocknum
(
ft
,
subtree_root
->
thisnodename
);
ft_set_or_verify_rightmost_blocknum
(
ft
,
subtree_root
->
blocknum
);
}
}
inject_message_in_locked_node
(
ft
,
subtree_root
,
target_childnum
,
msg
,
flow_deltas
,
gc_info
);
inject_message_in_locked_node
(
ft
,
subtree_root
,
target_childnum
,
msg
,
flow_deltas
,
gc_info
);
}
else
{
}
else
{
...
@@ -1967,7 +1967,7 @@ static void push_something_in_subtree(
...
@@ -1967,7 +1967,7 @@ static void push_something_in_subtree(
paranoid_invariant_notnull
(
child
);
paranoid_invariant_notnull
(
child
);
if
(
!
just_did_split_or_merge
)
{
if
(
!
just_did_split_or_merge
)
{
BLOCKNUM
subtree_root_blocknum
=
subtree_root
->
thisnodename
;
BLOCKNUM
subtree_root_blocknum
=
subtree_root
->
blocknum
;
uint32_t
subtree_root_fullhash
=
toku_cachetable_hash
(
ft
->
cf
,
subtree_root_blocknum
);
uint32_t
subtree_root_fullhash
=
toku_cachetable_hash
(
ft
->
cf
,
subtree_root_blocknum
);
const
bool
did_split_or_merge
=
process_maybe_reactive_child
(
ft
,
subtree_root
,
child
,
childnum
,
loc
);
const
bool
did_split_or_merge
=
process_maybe_reactive_child
(
ft
,
subtree_root
,
child
,
childnum
,
loc
);
if
(
did_split_or_merge
)
{
if
(
did_split_or_merge
)
{
...
@@ -2003,7 +2003,7 @@ static void push_something_in_subtree(
...
@@ -2003,7 +2003,7 @@ static void push_something_in_subtree(
{
{
// Right now we have a read lock on subtree_root, but we want
// Right now we have a read lock on subtree_root, but we want
// to inject into it so we get a write lock instead.
// to inject into it so we get a write lock instead.
BLOCKNUM
subtree_root_blocknum
=
subtree_root
->
thisnodename
;
BLOCKNUM
subtree_root_blocknum
=
subtree_root
->
blocknum
;
uint32_t
subtree_root_fullhash
=
toku_cachetable_hash
(
ft
->
cf
,
subtree_root_blocknum
);
uint32_t
subtree_root_fullhash
=
toku_cachetable_hash
(
ft
->
cf
,
subtree_root_blocknum
);
toku_unpin_ftnode_read_only
(
ft
,
subtree_root
);
toku_unpin_ftnode_read_only
(
ft
,
subtree_root
);
switch
(
depth
)
{
switch
(
depth
)
{
...
@@ -2318,7 +2318,7 @@ static int ft_maybe_insert_into_rightmost_leaf(FT ft, DBT *key, DBT *val, XIDS m
...
@@ -2318,7 +2318,7 @@ static int ft_maybe_insert_into_rightmost_leaf(FT ft, DBT *key, DBT *val, XIDS m
// The rightmost blocknum never chances once it is initialized to something
// The rightmost blocknum never chances once it is initialized to something
// other than null. Verify that the pinned node has the correct blocknum.
// other than null. Verify that the pinned node has the correct blocknum.
invariant
(
rightmost_leaf
->
thisnodename
.
b
==
rightmost_blocknum
.
b
);
invariant
(
rightmost_leaf
->
blocknum
.
b
==
rightmost_blocknum
.
b
);
// If the rightmost leaf is reactive, bail out out and let the normal promotion pass
// If the rightmost leaf is reactive, bail out out and let the normal promotion pass
// take care of it. This also ensures that if any of our ancestors are reactive,
// take care of it. This also ensures that if any of our ancestors are reactive,
...
@@ -3460,9 +3460,9 @@ ft_search_node (
...
@@ -3460,9 +3460,9 @@ ft_search_node (
);
);
static
int
static
int
ftnode_fetch_callback_and_free_bfe
(
CACHEFILE
cf
,
PAIR
p
,
int
fd
,
BLOCKNUM
nodename
,
uint32_t
fullhash
,
void
**
ftnode_pv
,
void
**
UU
(
disk_data
),
PAIR_ATTR
*
sizep
,
int
*
dirtyp
,
void
*
extraargs
)
ftnode_fetch_callback_and_free_bfe
(
CACHEFILE
cf
,
PAIR
p
,
int
fd
,
BLOCKNUM
blocknum
,
uint32_t
fullhash
,
void
**
ftnode_pv
,
void
**
UU
(
disk_data
),
PAIR_ATTR
*
sizep
,
int
*
dirtyp
,
void
*
extraargs
)
{
{
int
r
=
toku_ftnode_fetch_callback
(
cf
,
p
,
fd
,
nodename
,
fullhash
,
ftnode_pv
,
disk_data
,
sizep
,
dirtyp
,
extraargs
);
int
r
=
toku_ftnode_fetch_callback
(
cf
,
p
,
fd
,
blocknum
,
fullhash
,
ftnode_pv
,
disk_data
,
sizep
,
dirtyp
,
extraargs
);
struct
ftnode_fetch_extra
*
CAST_FROM_VOIDP
(
ffe
,
extraargs
);
struct
ftnode_fetch_extra
*
CAST_FROM_VOIDP
(
ffe
,
extraargs
);
destroy_bfe_for_prefetch
(
ffe
);
destroy_bfe_for_prefetch
(
ffe
);
toku_free
(
ffe
);
toku_free
(
ffe
);
...
...
ft/ft-test-helpers.cc
View file @
291dfdc9
...
@@ -134,7 +134,7 @@ int toku_testsetup_leaf(FT_HANDLE ft_handle, BLOCKNUM *blocknum, int n_children,
...
@@ -134,7 +134,7 @@ int toku_testsetup_leaf(FT_HANDLE ft_handle, BLOCKNUM *blocknum, int n_children,
node
->
totalchildkeylens
+=
keylens
[
i
];
node
->
totalchildkeylens
+=
keylens
[
i
];
}
}
*
blocknum
=
node
->
thisnodename
;
*
blocknum
=
node
->
blocknum
;
toku_unpin_ftnode
(
ft_handle
->
ft
,
node
);
toku_unpin_ftnode
(
ft_handle
->
ft
,
node
);
return
0
;
return
0
;
}
}
...
@@ -153,7 +153,7 @@ int toku_testsetup_nonleaf (FT_HANDLE ft_handle, int height, BLOCKNUM *blocknum,
...
@@ -153,7 +153,7 @@ int toku_testsetup_nonleaf (FT_HANDLE ft_handle, int height, BLOCKNUM *blocknum,
toku_memdup_dbt
(
&
node
->
childkeys
[
i
],
keys
[
i
],
keylens
[
i
]);
toku_memdup_dbt
(
&
node
->
childkeys
[
i
],
keys
[
i
],
keylens
[
i
]);
node
->
totalchildkeylens
+=
keylens
[
i
];
node
->
totalchildkeylens
+=
keylens
[
i
];
}
}
*
blocknum
=
node
->
thisnodename
;
*
blocknum
=
node
->
blocknum
;
toku_unpin_ftnode
(
ft_handle
->
ft
,
node
);
toku_unpin_ftnode
(
ft_handle
->
ft
,
node
);
return
0
;
return
0
;
}
}
...
...
ft/ft-verify.cc
View file @
291dfdc9
...
@@ -397,7 +397,7 @@ toku_verify_ftnode_internal(FT_HANDLE ft_handle,
...
@@ -397,7 +397,7 @@ toku_verify_ftnode_internal(FT_HANDLE ft_handle,
{
{
int
result
=
0
;
int
result
=
0
;
MSN
this_msn
;
MSN
this_msn
;
BLOCKNUM
blocknum
=
node
->
thisnodename
;
BLOCKNUM
blocknum
=
node
->
blocknum
;
//printf("%s:%d pin %p\n", __FILE__, __LINE__, node_v);
//printf("%s:%d pin %p\n", __FILE__, __LINE__, node_v);
toku_ftnode_assert_fully_in_memory
(
node
);
toku_ftnode_assert_fully_in_memory
(
node
);
...
@@ -440,7 +440,7 @@ toku_verify_ftnode_internal(FT_HANDLE ft_handle,
...
@@ -440,7 +440,7 @@ toku_verify_ftnode_internal(FT_HANDLE ft_handle,
int
r
=
bnc
->
msg_buffer
.
iterate
(
verify_msg
);
int
r
=
bnc
->
msg_buffer
.
iterate
(
verify_msg
);
if
(
r
!=
0
)
{
result
=
r
;
goto
done
;
}
if
(
r
!=
0
)
{
result
=
r
;
goto
done
;
}
struct
verify_message_tree_extra
extra
=
{
.
msg_buffer
=
&
bnc
->
msg_buffer
,
.
broadcast
=
false
,
.
is_fresh
=
true
,
.
i
=
i
,
.
verbose
=
verbose
,
.
blocknum
=
node
->
thisnodename
,
.
keep_going_on_failure
=
keep_going_on_failure
,
.
messages_have_been_moved
=
messages_have_been_moved
};
struct
verify_message_tree_extra
extra
=
{
.
msg_buffer
=
&
bnc
->
msg_buffer
,
.
broadcast
=
false
,
.
is_fresh
=
true
,
.
i
=
i
,
.
verbose
=
verbose
,
.
blocknum
=
node
->
blocknum
,
.
keep_going_on_failure
=
keep_going_on_failure
,
.
messages_have_been_moved
=
messages_have_been_moved
};
r
=
bnc
->
fresh_message_tree
.
iterate
<
struct
verify_message_tree_extra
,
verify_message_tree
>
(
&
extra
);
r
=
bnc
->
fresh_message_tree
.
iterate
<
struct
verify_message_tree_extra
,
verify_message_tree
>
(
&
extra
);
if
(
r
!=
0
)
{
result
=
r
;
goto
done
;
}
if
(
r
!=
0
)
{
result
=
r
;
goto
done
;
}
extra
.
is_fresh
=
false
;
extra
.
is_fresh
=
false
;
...
...
ft/ft_node-serialize.cc
View file @
291dfdc9
...
@@ -1360,7 +1360,7 @@ setup_partitions_using_bfe(FTNODE node,
...
@@ -1360,7 +1360,7 @@ setup_partitions_using_bfe(FTNODE node,
//
//
// setup memory needed for the node
// setup memory needed for the node
//
//
//printf("node height %d, blocknum %" PRId64 ", type %d lc %d rc %d\n", node->height, node->
thisnodename
.b, bfe->type, lc, rc);
//printf("node height %d, blocknum %" PRId64 ", type %d lc %d rc %d\n", node->height, node->
blocknum
.b, bfe->type, lc, rc);
for
(
int
i
=
0
;
i
<
node
->
n_children
;
i
++
)
{
for
(
int
i
=
0
;
i
<
node
->
n_children
;
i
++
)
{
BP_INIT_UNTOUCHED_CLOCK
(
node
,
i
);
BP_INIT_UNTOUCHED_CLOCK
(
node
,
i
);
if
(
data_in_memory
)
{
if
(
data_in_memory
)
{
...
@@ -1496,7 +1496,7 @@ static FTNODE alloc_ftnode_for_deserialize(uint32_t fullhash, BLOCKNUM blocknum)
...
@@ -1496,7 +1496,7 @@ static FTNODE alloc_ftnode_for_deserialize(uint32_t fullhash, BLOCKNUM blocknum)
// Effect: Allocate an FTNODE and fill in the values that are not read from
// Effect: Allocate an FTNODE and fill in the values that are not read from
FTNODE
XMALLOC
(
node
);
FTNODE
XMALLOC
(
node
);
node
->
fullhash
=
fullhash
;
node
->
fullhash
=
fullhash
;
node
->
thisnodename
=
blocknum
;
node
->
blocknum
=
blocknum
;
node
->
dirty
=
0
;
node
->
dirty
=
0
;
node
->
bp
=
nullptr
;
node
->
bp
=
nullptr
;
node
->
oldest_referenced_xid_known
=
TXNID_NONE
;
node
->
oldest_referenced_xid_known
=
TXNID_NONE
;
...
@@ -2346,7 +2346,7 @@ toku_deserialize_bp_from_disk(FTNODE node, FTNODE_DISK_DATA ndd, int childnum, i
...
@@ -2346,7 +2346,7 @@ toku_deserialize_bp_from_disk(FTNODE node, FTNODE_DISK_DATA ndd, int childnum, i
DISKOFF
node_offset
,
total_node_disk_size
;
DISKOFF
node_offset
,
total_node_disk_size
;
toku_translate_blocknum_to_offset_size
(
toku_translate_blocknum_to_offset_size
(
bfe
->
h
->
blocktable
,
bfe
->
h
->
blocktable
,
node
->
thisnodename
,
node
->
blocknum
,
&
node_offset
,
&
node_offset
,
&
total_node_disk_size
&
total_node_disk_size
);
);
...
...
ft/node.cc
View file @
291dfdc9
...
@@ -97,13 +97,13 @@ PATENT RIGHTS GRANT:
...
@@ -97,13 +97,13 @@ PATENT RIGHTS GRANT:
// Effect: Fill in N as an empty ftnode.
// Effect: Fill in N as an empty ftnode.
// TODO: Rename toku_ftnode_create
// TODO: Rename toku_ftnode_create
void
toku_initialize_empty_ftnode
(
FTNODE
n
,
BLOCKNUM
nodename
,
int
height
,
int
num_children
,
int
layout_version
,
unsigned
int
flags
)
{
void
toku_initialize_empty_ftnode
(
FTNODE
n
,
BLOCKNUM
blocknum
,
int
height
,
int
num_children
,
int
layout_version
,
unsigned
int
flags
)
{
paranoid_invariant
(
layout_version
!=
0
);
paranoid_invariant
(
layout_version
!=
0
);
paranoid_invariant
(
height
>=
0
);
paranoid_invariant
(
height
>=
0
);
n
->
max_msn_applied_to_node_on_disk
=
ZERO_MSN
;
// correct value for root node, harmless for others
n
->
max_msn_applied_to_node_on_disk
=
ZERO_MSN
;
// correct value for root node, harmless for others
n
->
flags
=
flags
;
n
->
flags
=
flags
;
n
->
thisnodename
=
nodename
;
n
->
blocknum
=
blocknum
;
n
->
layout_version
=
layout_version
;
n
->
layout_version
=
layout_version
;
n
->
layout_version_original
=
layout_version
;
n
->
layout_version_original
=
layout_version
;
n
->
layout_version_read_from_disk
=
layout_version
;
n
->
layout_version_read_from_disk
=
layout_version
;
...
@@ -1126,7 +1126,7 @@ long toku_bnc_memory_used(NONLEAF_CHILDINFO bnc) {
...
@@ -1126,7 +1126,7 @@ long toku_bnc_memory_used(NONLEAF_CHILDINFO bnc) {
static
void
static
void
init_childinfo
(
FTNODE
node
,
int
childnum
,
FTNODE
child
)
{
init_childinfo
(
FTNODE
node
,
int
childnum
,
FTNODE
child
)
{
BP_BLOCKNUM
(
node
,
childnum
)
=
child
->
thisnodename
;
BP_BLOCKNUM
(
node
,
childnum
)
=
child
->
blocknum
;
BP_STATE
(
node
,
childnum
)
=
PT_AVAIL
;
BP_STATE
(
node
,
childnum
)
=
PT_AVAIL
;
BP_WORKDONE
(
node
,
childnum
)
=
0
;
BP_WORKDONE
(
node
,
childnum
)
=
0
;
set_BNC
(
node
,
childnum
,
toku_create_empty_nl
());
set_BNC
(
node
,
childnum
,
toku_create_empty_nl
());
...
...
ft/node.h
View file @
291dfdc9
...
@@ -96,7 +96,7 @@ PATENT RIGHTS GRANT:
...
@@ -96,7 +96,7 @@ PATENT RIGHTS GRANT:
struct
ftnode
{
struct
ftnode
{
MSN
max_msn_applied_to_node_on_disk
;
// max_msn_applied that will be written to disk
MSN
max_msn_applied_to_node_on_disk
;
// max_msn_applied that will be written to disk
unsigned
int
flags
;
unsigned
int
flags
;
BLOCKNUM
thisnodename
;
// Which block number is this node?
BLOCKNUM
blocknum
;
// Which block number is this node?
int
layout_version
;
// What version of the data structure?
int
layout_version
;
// What version of the data structure?
int
layout_version_original
;
// different (<) from layout_version if upgraded from a previous version (useful for debugging)
int
layout_version_original
;
// different (<) from layout_version if upgraded from a previous version (useful for debugging)
int
layout_version_read_from_disk
;
// transient, not serialized to disk, (useful for debugging)
int
layout_version_read_from_disk
;
// transient, not serialized to disk, (useful for debugging)
...
@@ -240,7 +240,7 @@ BASEMENTNODE toku_detach_bn(FTNODE node, int childnum);
...
@@ -240,7 +240,7 @@ BASEMENTNODE toku_detach_bn(FTNODE node, int childnum);
void
toku_ftnode_update_disk_stats
(
FTNODE
ftnode
,
FT
ft
,
bool
for_checkpoint
);
void
toku_ftnode_update_disk_stats
(
FTNODE
ftnode
,
FT
ft
,
bool
for_checkpoint
);
void
toku_ftnode_clone_partitions
(
FTNODE
node
,
FTNODE
cloned_node
);
void
toku_ftnode_clone_partitions
(
FTNODE
node
,
FTNODE
cloned_node
);
void
toku_initialize_empty_ftnode
(
FTNODE
node
,
BLOCKNUM
nodename
,
int
height
,
int
num_children
,
void
toku_initialize_empty_ftnode
(
FTNODE
node
,
BLOCKNUM
blocknum
,
int
height
,
int
num_children
,
int
layout_version
,
unsigned
int
flags
);
int
layout_version
,
unsigned
int
flags
);
int
toku_ftnode_which_child
(
FTNODE
node
,
const
DBT
*
k
,
int
toku_ftnode_which_child
(
FTNODE
node
,
const
DBT
*
k
,
...
...
ft/tests/ft-bfe-query.cc
View file @
291dfdc9
...
@@ -372,7 +372,7 @@ test_prefetching(void) {
...
@@ -372,7 +372,7 @@ test_prefetching(void) {
// source_ft.fd=fd;
// source_ft.fd=fd;
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
flags
=
0x11223344
;
sn
.
flags
=
0x11223344
;
sn
.
thisnodename
.
b
=
20
;
sn
.
blocknum
.
b
=
20
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
height
=
1
;
sn
.
height
=
1
;
...
...
ft/tests/ft-clock-test.cc
View file @
291dfdc9
...
@@ -311,7 +311,7 @@ test_serialize_nonleaf(void) {
...
@@ -311,7 +311,7 @@ test_serialize_nonleaf(void) {
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
char
*
hello_string
;
char
*
hello_string
;
sn
.
flags
=
0x11223344
;
sn
.
flags
=
0x11223344
;
sn
.
thisnodename
.
b
=
20
;
sn
.
blocknum
.
b
=
20
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
height
=
1
;
sn
.
height
=
1
;
...
@@ -411,7 +411,7 @@ test_serialize_leaf(void) {
...
@@ -411,7 +411,7 @@ test_serialize_leaf(void) {
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
flags
=
0x11223344
;
sn
.
flags
=
0x11223344
;
sn
.
thisnodename
.
b
=
20
;
sn
.
blocknum
.
b
=
20
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
height
=
0
;
sn
.
height
=
0
;
...
...
ft/tests/ft-serialize-benchmark.cc
View file @
291dfdc9
...
@@ -144,7 +144,7 @@ test_serialize_leaf(int valsize, int nelts, double entropy, int ser_runs, int de
...
@@ -144,7 +144,7 @@ test_serialize_leaf(int valsize, int nelts, double entropy, int ser_runs, int de
sn
->
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
->
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
->
flags
=
0x11223344
;
sn
->
flags
=
0x11223344
;
sn
->
thisnodename
.
b
=
20
;
sn
->
blocknum
.
b
=
20
;
sn
->
layout_version
=
FT_LAYOUT_VERSION
;
sn
->
layout_version
=
FT_LAYOUT_VERSION
;
sn
->
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
->
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
->
height
=
0
;
sn
->
height
=
0
;
...
@@ -299,7 +299,7 @@ test_serialize_nonleaf(int valsize, int nelts, double entropy, int ser_runs, int
...
@@ -299,7 +299,7 @@ test_serialize_nonleaf(int valsize, int nelts, double entropy, int ser_runs, int
// source_ft.fd=fd;
// source_ft.fd=fd;
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
flags
=
0x11223344
;
sn
.
flags
=
0x11223344
;
sn
.
thisnodename
.
b
=
20
;
sn
.
blocknum
.
b
=
20
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
height
=
1
;
sn
.
height
=
1
;
...
...
ft/tests/ft-serialize-test.cc
View file @
291dfdc9
...
@@ -271,7 +271,7 @@ test_serialize_leaf_check_msn(enum ftnode_verify_type bft, bool do_clone) {
...
@@ -271,7 +271,7 @@ test_serialize_leaf_check_msn(enum ftnode_verify_type bft, bool do_clone) {
sn
.
max_msn_applied_to_node_on_disk
=
PRESERIALIZE_MSN_ON_DISK
;
sn
.
max_msn_applied_to_node_on_disk
=
PRESERIALIZE_MSN_ON_DISK
;
sn
.
flags
=
0x11223344
;
sn
.
flags
=
0x11223344
;
sn
.
thisnodename
.
b
=
20
;
sn
.
blocknum
.
b
=
20
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
height
=
0
;
sn
.
height
=
0
;
...
@@ -330,7 +330,7 @@ test_serialize_leaf_check_msn(enum ftnode_verify_type bft, bool do_clone) {
...
@@ -330,7 +330,7 @@ test_serialize_leaf_check_msn(enum ftnode_verify_type bft, bool do_clone) {
setup_dn
(
bft
,
fd
,
ft_h
,
&
dn
,
&
dest_ndd
);
setup_dn
(
bft
,
fd
,
ft_h
,
&
dn
,
&
dest_ndd
);
assert
(
dn
->
thisnodename
.
b
==
20
);
assert
(
dn
->
blocknum
.
b
==
20
);
assert
(
dn
->
layout_version
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version_original
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version_original
==
FT_LAYOUT_VERSION
);
...
@@ -405,7 +405,7 @@ test_serialize_leaf_with_large_pivots(enum ftnode_verify_type bft, bool do_clone
...
@@ -405,7 +405,7 @@ test_serialize_leaf_with_large_pivots(enum ftnode_verify_type bft, bool do_clone
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
flags
=
0x11223344
;
sn
.
flags
=
0x11223344
;
sn
.
thisnodename
.
b
=
20
;
sn
.
blocknum
.
b
=
20
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
height
=
0
;
sn
.
height
=
0
;
...
@@ -471,7 +471,7 @@ test_serialize_leaf_with_large_pivots(enum ftnode_verify_type bft, bool do_clone
...
@@ -471,7 +471,7 @@ test_serialize_leaf_with_large_pivots(enum ftnode_verify_type bft, bool do_clone
setup_dn
(
bft
,
fd
,
ft_h
,
&
dn
,
&
dest_ndd
);
setup_dn
(
bft
,
fd
,
ft_h
,
&
dn
,
&
dest_ndd
);
assert
(
dn
->
thisnodename
.
b
==
20
);
assert
(
dn
->
blocknum
.
b
==
20
);
assert
(
dn
->
layout_version
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version_original
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version_original
==
FT_LAYOUT_VERSION
);
...
@@ -546,7 +546,7 @@ test_serialize_leaf_with_many_rows(enum ftnode_verify_type bft, bool do_clone) {
...
@@ -546,7 +546,7 @@ test_serialize_leaf_with_many_rows(enum ftnode_verify_type bft, bool do_clone) {
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
flags
=
0x11223344
;
sn
.
flags
=
0x11223344
;
sn
.
thisnodename
.
b
=
20
;
sn
.
blocknum
.
b
=
20
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
height
=
0
;
sn
.
height
=
0
;
...
@@ -606,7 +606,7 @@ test_serialize_leaf_with_many_rows(enum ftnode_verify_type bft, bool do_clone) {
...
@@ -606,7 +606,7 @@ test_serialize_leaf_with_many_rows(enum ftnode_verify_type bft, bool do_clone) {
setup_dn
(
bft
,
fd
,
ft_h
,
&
dn
,
&
dest_ndd
);
setup_dn
(
bft
,
fd
,
ft_h
,
&
dn
,
&
dest_ndd
);
assert
(
dn
->
thisnodename
.
b
==
20
);
assert
(
dn
->
blocknum
.
b
==
20
);
assert
(
dn
->
layout_version
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version_original
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version_original
==
FT_LAYOUT_VERSION
);
...
@@ -687,7 +687,7 @@ test_serialize_leaf_with_large_rows(enum ftnode_verify_type bft, bool do_clone)
...
@@ -687,7 +687,7 @@ test_serialize_leaf_with_large_rows(enum ftnode_verify_type bft, bool do_clone)
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
flags
=
0x11223344
;
sn
.
flags
=
0x11223344
;
sn
.
thisnodename
.
b
=
20
;
sn
.
blocknum
.
b
=
20
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
height
=
0
;
sn
.
height
=
0
;
...
@@ -750,7 +750,7 @@ test_serialize_leaf_with_large_rows(enum ftnode_verify_type bft, bool do_clone)
...
@@ -750,7 +750,7 @@ test_serialize_leaf_with_large_rows(enum ftnode_verify_type bft, bool do_clone)
setup_dn
(
bft
,
fd
,
ft_h
,
&
dn
,
&
dest_ndd
);
setup_dn
(
bft
,
fd
,
ft_h
,
&
dn
,
&
dest_ndd
);
assert
(
dn
->
thisnodename
.
b
==
20
);
assert
(
dn
->
blocknum
.
b
==
20
);
assert
(
dn
->
layout_version
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version_original
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version_original
==
FT_LAYOUT_VERSION
);
...
@@ -831,7 +831,7 @@ test_serialize_leaf_with_empty_basement_nodes(enum ftnode_verify_type bft, bool
...
@@ -831,7 +831,7 @@ test_serialize_leaf_with_empty_basement_nodes(enum ftnode_verify_type bft, bool
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
flags
=
0x11223344
;
sn
.
flags
=
0x11223344
;
sn
.
thisnodename
.
b
=
20
;
sn
.
blocknum
.
b
=
20
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
height
=
0
;
sn
.
height
=
0
;
...
@@ -893,7 +893,7 @@ test_serialize_leaf_with_empty_basement_nodes(enum ftnode_verify_type bft, bool
...
@@ -893,7 +893,7 @@ test_serialize_leaf_with_empty_basement_nodes(enum ftnode_verify_type bft, bool
setup_dn
(
bft
,
fd
,
ft_h
,
&
dn
,
&
dest_ndd
);
setup_dn
(
bft
,
fd
,
ft_h
,
&
dn
,
&
dest_ndd
);
assert
(
dn
->
thisnodename
.
b
==
20
);
assert
(
dn
->
blocknum
.
b
==
20
);
assert
(
dn
->
layout_version
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version_original
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version_original
==
FT_LAYOUT_VERSION
);
...
@@ -966,7 +966,7 @@ test_serialize_leaf_with_multiple_empty_basement_nodes(enum ftnode_verify_type b
...
@@ -966,7 +966,7 @@ test_serialize_leaf_with_multiple_empty_basement_nodes(enum ftnode_verify_type b
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
flags
=
0x11223344
;
sn
.
flags
=
0x11223344
;
sn
.
thisnodename
.
b
=
20
;
sn
.
blocknum
.
b
=
20
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
height
=
0
;
sn
.
height
=
0
;
...
@@ -1022,7 +1022,7 @@ test_serialize_leaf_with_multiple_empty_basement_nodes(enum ftnode_verify_type b
...
@@ -1022,7 +1022,7 @@ test_serialize_leaf_with_multiple_empty_basement_nodes(enum ftnode_verify_type b
setup_dn
(
bft
,
fd
,
ft_h
,
&
dn
,
&
dest_ndd
);
setup_dn
(
bft
,
fd
,
ft_h
,
&
dn
,
&
dest_ndd
);
assert
(
dn
->
thisnodename
.
b
==
20
);
assert
(
dn
->
blocknum
.
b
==
20
);
assert
(
dn
->
layout_version
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version_original
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version_original
==
FT_LAYOUT_VERSION
);
...
@@ -1076,7 +1076,7 @@ test_serialize_nonleaf(enum ftnode_verify_type bft, bool do_clone) {
...
@@ -1076,7 +1076,7 @@ test_serialize_nonleaf(enum ftnode_verify_type bft, bool do_clone) {
// source_ft.fd=fd;
// source_ft.fd=fd;
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
max_msn_applied_to_node_on_disk
.
msn
=
0
;
sn
.
flags
=
0x11223344
;
sn
.
flags
=
0x11223344
;
sn
.
thisnodename
.
b
=
20
;
sn
.
blocknum
.
b
=
20
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
height
=
1
;
sn
.
height
=
1
;
...
@@ -1147,7 +1147,7 @@ test_serialize_nonleaf(enum ftnode_verify_type bft, bool do_clone) {
...
@@ -1147,7 +1147,7 @@ test_serialize_nonleaf(enum ftnode_verify_type bft, bool do_clone) {
setup_dn
(
bft
,
fd
,
ft_h
,
&
dn
,
&
dest_ndd
);
setup_dn
(
bft
,
fd
,
ft_h
,
&
dn
,
&
dest_ndd
);
assert
(
dn
->
thisnodename
.
b
==
20
);
assert
(
dn
->
blocknum
.
b
==
20
);
assert
(
dn
->
layout_version
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version_original
==
FT_LAYOUT_VERSION
);
assert
(
dn
->
layout_version_original
==
FT_LAYOUT_VERSION
);
...
...
ft/tests/make-tree.cc
View file @
291dfdc9
...
@@ -222,7 +222,7 @@ test_make_tree(int height, int fanout, int nperleaf, int do_verify) {
...
@@ -222,7 +222,7 @@ test_make_tree(int height, int fanout, int nperleaf, int do_verify) {
FTNODE
newroot
=
make_tree
(
ft
,
height
,
fanout
,
nperleaf
,
&
seq
,
&
minkey
,
&
maxkey
);
FTNODE
newroot
=
make_tree
(
ft
,
height
,
fanout
,
nperleaf
,
&
seq
,
&
minkey
,
&
maxkey
);
// set the new root to point to the new tree
// set the new root to point to the new tree
toku_ft_set_new_root_blocknum
(
ft
->
ft
,
newroot
->
thisnodename
);
toku_ft_set_new_root_blocknum
(
ft
->
ft
,
newroot
->
blocknum
);
ft
->
ft
->
h
->
max_msn_in_ft
=
last_dummymsn
();
// capture msn of last message injected into tree
ft
->
ft
->
h
->
max_msn_in_ft
=
last_dummymsn
();
// capture msn of last message injected into tree
...
...
ft/tests/mempool-115.cc
View file @
291dfdc9
...
@@ -149,7 +149,7 @@ public:
...
@@ -149,7 +149,7 @@ public:
// just copy this code from a previous test
// just copy this code from a previous test
// don't care what it does, just want to get a node up and running
// don't care what it does, just want to get a node up and running
sn
.
flags
=
0x11223344
;
sn
.
flags
=
0x11223344
;
sn
.
thisnodename
.
b
=
20
;
sn
.
blocknum
.
b
=
20
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
layout_version_original
=
FT_LAYOUT_VERSION
;
sn
.
height
=
0
;
sn
.
height
=
0
;
...
...
ft/tests/msnfilter.cc
View file @
291dfdc9
...
@@ -213,7 +213,7 @@ test_msnfilter(int do_verify) {
...
@@ -213,7 +213,7 @@ test_msnfilter(int do_verify) {
FTNODE
newroot
=
make_node
(
ft
,
0
);
FTNODE
newroot
=
make_node
(
ft
,
0
);
// set the new root to point to the new tree
// set the new root to point to the new tree
toku_ft_set_new_root_blocknum
(
ft
->
ft
,
newroot
->
thisnodename
);
toku_ft_set_new_root_blocknum
(
ft
->
ft
,
newroot
->
blocknum
);
// KLUDGE: Unpin the new root so toku_ft_lookup() can pin it. (Pin lock is no longer a recursive
// KLUDGE: Unpin the new root so toku_ft_lookup() can pin it. (Pin lock is no longer a recursive
// mutex.) Just leaving it unpinned for this test program works because it is the only
// mutex.) Just leaving it unpinned for this test program works because it is the only
...
...
ft/tests/test3884.cc
View file @
291dfdc9
...
@@ -154,7 +154,7 @@ static void
...
@@ -154,7 +154,7 @@ static void
setup_ftnode_header
(
struct
ftnode
*
node
)
setup_ftnode_header
(
struct
ftnode
*
node
)
{
{
node
->
flags
=
0x11223344
;
node
->
flags
=
0x11223344
;
node
->
thisnodename
.
b
=
20
;
node
->
blocknum
.
b
=
20
;
node
->
layout_version
=
FT_LAYOUT_VERSION
;
node
->
layout_version
=
FT_LAYOUT_VERSION
;
node
->
layout_version_original
=
FT_LAYOUT_VERSION
;
node
->
layout_version_original
=
FT_LAYOUT_VERSION
;
node
->
height
=
0
;
node
->
height
=
0
;
...
...
ft/tests/test_rightmost_leaf_split_merge.cc
View file @
291dfdc9
...
@@ -149,7 +149,7 @@ static void test_split_merge(void) {
...
@@ -149,7 +149,7 @@ static void test_split_merge(void) {
toku_cachetable_hash
(
ft
->
cf
,
ft
->
h
->
root_blocknum
),
toku_cachetable_hash
(
ft
->
cf
,
ft
->
h
->
root_blocknum
),
&
bfe
,
PL_WRITE_EXPENSIVE
,
&
root_node
,
true
);
&
bfe
,
PL_WRITE_EXPENSIVE
,
&
root_node
,
true
);
// root blocknum should be consistent
// root blocknum should be consistent
invariant
(
root_node
->
thisnodename
.
b
==
ft
->
h
->
root_blocknum
.
b
);
invariant
(
root_node
->
blocknum
.
b
==
ft
->
h
->
root_blocknum
.
b
);
// root should have split at least once, and it should now be at height 1
// root should have split at least once, and it should now be at height 1
invariant
(
root_node
->
n_children
>
1
);
invariant
(
root_node
->
n_children
>
1
);
invariant
(
root_node
->
height
==
1
);
invariant
(
root_node
->
height
==
1
);
...
...
ft/tests/verify-bad-msn.cc
View file @
291dfdc9
...
@@ -225,7 +225,7 @@ test_make_tree(int height, int fanout, int nperleaf, int do_verify) {
...
@@ -225,7 +225,7 @@ test_make_tree(int height, int fanout, int nperleaf, int do_verify) {
FTNODE
newroot
=
make_tree
(
ft
,
height
,
fanout
,
nperleaf
,
&
seq
,
&
minkey
,
&
maxkey
);
FTNODE
newroot
=
make_tree
(
ft
,
height
,
fanout
,
nperleaf
,
&
seq
,
&
minkey
,
&
maxkey
);
// set the new root to point to the new tree
// set the new root to point to the new tree
toku_ft_set_new_root_blocknum
(
ft
->
ft
,
newroot
->
thisnodename
);
toku_ft_set_new_root_blocknum
(
ft
->
ft
,
newroot
->
blocknum
);
// Create bad tree (don't do following):
// Create bad tree (don't do following):
// newroot->max_msn_applied_to_node = last_dummymsn(); // capture msn of last message injected into tree
// newroot->max_msn_applied_to_node = last_dummymsn(); // capture msn of last message injected into tree
...
...
ft/tests/verify-bad-pivots.cc
View file @
291dfdc9
...
@@ -195,7 +195,7 @@ test_make_tree(int height, int fanout, int nperleaf, int do_verify) {
...
@@ -195,7 +195,7 @@ test_make_tree(int height, int fanout, int nperleaf, int do_verify) {
FTNODE
newroot
=
make_tree
(
ft
,
height
,
fanout
,
nperleaf
,
&
seq
,
&
minkey
,
&
maxkey
);
FTNODE
newroot
=
make_tree
(
ft
,
height
,
fanout
,
nperleaf
,
&
seq
,
&
minkey
,
&
maxkey
);
// discard the old root block
// discard the old root block
toku_ft_set_new_root_blocknum
(
ft
->
ft
,
newroot
->
thisnodename
);
toku_ft_set_new_root_blocknum
(
ft
->
ft
,
newroot
->
blocknum
);
// unpin the new root
// unpin the new root
toku_unpin_ftnode
(
ft
->
ft
,
newroot
);
toku_unpin_ftnode
(
ft
->
ft
,
newroot
);
...
...
ft/tests/verify-dup-in-leaf.cc
View file @
291dfdc9
...
@@ -155,7 +155,7 @@ test_dup_in_leaf(int do_verify) {
...
@@ -155,7 +155,7 @@ test_dup_in_leaf(int do_verify) {
populate_leaf
(
newroot
,
htonl
(
2
),
2
);
populate_leaf
(
newroot
,
htonl
(
2
),
2
);
// set the new root to point to the new tree
// set the new root to point to the new tree
toku_ft_set_new_root_blocknum
(
ft
->
ft
,
newroot
->
thisnodename
);
toku_ft_set_new_root_blocknum
(
ft
->
ft
,
newroot
->
blocknum
);
// unpin the new root
// unpin the new root
toku_unpin_ftnode
(
ft
->
ft
,
newroot
);
toku_unpin_ftnode
(
ft
->
ft
,
newroot
);
...
...
ft/tests/verify-dup-pivots.cc
View file @
291dfdc9
...
@@ -199,7 +199,7 @@ test_make_tree(int height, int fanout, int nperleaf, int do_verify) {
...
@@ -199,7 +199,7 @@ test_make_tree(int height, int fanout, int nperleaf, int do_verify) {
// discard the old root block
// discard the old root block
// set the new root to point to the new tree
// set the new root to point to the new tree
toku_ft_set_new_root_blocknum
(
ft
->
ft
,
newroot
->
thisnodename
);
toku_ft_set_new_root_blocknum
(
ft
->
ft
,
newroot
->
blocknum
);
// unpin the new root
// unpin the new root
toku_unpin_ftnode
(
ft
->
ft
,
newroot
);
toku_unpin_ftnode
(
ft
->
ft
,
newroot
);
...
...
ft/tests/verify-misrouted-msgs.cc
View file @
291dfdc9
...
@@ -211,7 +211,7 @@ test_make_tree(int height, int fanout, int nperleaf, int do_verify) {
...
@@ -211,7 +211,7 @@ test_make_tree(int height, int fanout, int nperleaf, int do_verify) {
// discard the old root block
// discard the old root block
// set the new root to point to the new tree
// set the new root to point to the new tree
toku_ft_set_new_root_blocknum
(
ft
->
ft
,
newroot
->
thisnodename
);
toku_ft_set_new_root_blocknum
(
ft
->
ft
,
newroot
->
blocknum
);
// unpin the new root
// unpin the new root
toku_unpin_ftnode
(
ft
->
ft
,
newroot
);
toku_unpin_ftnode
(
ft
->
ft
,
newroot
);
...
...
ft/tests/verify-unsorted-leaf.cc
View file @
291dfdc9
...
@@ -156,7 +156,7 @@ test_dup_in_leaf(int do_verify) {
...
@@ -156,7 +156,7 @@ test_dup_in_leaf(int do_verify) {
populate_leaf
(
newroot
,
htonl
(
1
),
2
);
populate_leaf
(
newroot
,
htonl
(
1
),
2
);
// set the new root to point to the new tree
// set the new root to point to the new tree
toku_ft_set_new_root_blocknum
(
ft
->
ft
,
newroot
->
thisnodename
);
toku_ft_set_new_root_blocknum
(
ft
->
ft
,
newroot
->
blocknum
);
// unpin the new root
// unpin the new root
toku_unpin_ftnode
(
ft
->
ft
,
newroot
);
toku_unpin_ftnode
(
ft
->
ft
,
newroot
);
...
...
ft/tests/verify-unsorted-pivots.cc
View file @
291dfdc9
...
@@ -195,7 +195,7 @@ test_make_tree(int height, int fanout, int nperleaf, int do_verify) {
...
@@ -195,7 +195,7 @@ test_make_tree(int height, int fanout, int nperleaf, int do_verify) {
FTNODE
newroot
=
make_tree
(
ft
,
height
,
fanout
,
nperleaf
,
&
seq
,
&
minkey
,
&
maxkey
);
FTNODE
newroot
=
make_tree
(
ft
,
height
,
fanout
,
nperleaf
,
&
seq
,
&
minkey
,
&
maxkey
);
// discard the old root block
// discard the old root block
toku_ft_set_new_root_blocknum
(
ft
->
ft
,
newroot
->
thisnodename
);
toku_ft_set_new_root_blocknum
(
ft
->
ft
,
newroot
->
blocknum
);
// unpin the new root
// unpin the new root
toku_unpin_ftnode
(
ft
->
ft
,
newroot
);
toku_unpin_ftnode
(
ft
->
ft
,
newroot
);
...
...
ft/tokuftdump.cc
View file @
291dfdc9
...
@@ -239,7 +239,7 @@ static void dump_node(int fd, BLOCKNUM blocknum, FT h) {
...
@@ -239,7 +239,7 @@ static void dump_node(int fd, BLOCKNUM blocknum, FT h) {
printf
(
" disksize =%"
PRId64
"
\n
"
,
disksize
);
printf
(
" disksize =%"
PRId64
"
\n
"
,
disksize
);
printf
(
" serialize_size =%u
\n
"
,
toku_serialize_ftnode_size
(
n
));
printf
(
" serialize_size =%u
\n
"
,
toku_serialize_ftnode_size
(
n
));
printf
(
" flags =%u
\n
"
,
n
->
flags
);
printf
(
" flags =%u
\n
"
,
n
->
flags
);
printf
(
"
thisnodename=%"
PRId64
"
\n
"
,
n
->
thisnodename
.
b
);
printf
(
"
blocknum=%"
PRId64
"
\n
"
,
n
->
blocknum
.
b
);
//printf(" log_lsn =%lld\n", n->log_lsn.lsn); // The log_lsn is a memory-only value.
//printf(" log_lsn =%lld\n", n->log_lsn.lsn); // The log_lsn is a memory-only value.
printf
(
" height =%d
\n
"
,
n
->
height
);
printf
(
" height =%d
\n
"
,
n
->
height
);
printf
(
" layout_version=%d
\n
"
,
n
->
layout_version
);
printf
(
" layout_version=%d
\n
"
,
n
->
layout_version
);
...
...
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