Commit d6923f82 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:4741] finish removing brt_header reference from brtnode


git-svn-id: file:///svn/toku/tokudb@43554 c7de825b-a66e-492c-adef-691d508d4ae1
parent d469478e
......@@ -95,8 +95,7 @@ create_new_brtnode_with_dep_nodes(
n_children,
h->layout_version,
h->nodesize,
h->flags,
h);
h->flags);
assert((*result)->nodesize > 0);
(*result)->fullhash = fullhash;
......
......@@ -808,8 +808,7 @@ brtleaf_split(
num_children_in_b,
h->layout_version,
h->nodesize,
h->flags,
h);
h->flags);
assert(B->nodesize > 0);
B->fullhash = fullhash;
}
......
......@@ -226,7 +226,6 @@ struct __attribute__((__packed__)) brtnode_partition {
struct brtnode {
MSN max_msn_applied_to_node_on_disk; // max_msn_applied that will be written to disk
struct brt_header *h; // in-memory only
unsigned int nodesize;
unsigned int flags;
BLOCKNUM thisnodename; // Which block number is this node?
......@@ -434,14 +433,16 @@ PAIR_ATTR make_invalid_pair_attr(void);
/* serialization code */
void
toku_create_compressed_partition_from_available(
BRTNODE node,
int childnum,
BRTNODE node,
int childnum,
enum toku_compression_method compression_method,
SUB_BLOCK sb
);
void rebalance_brtnode_leaf(BRTNODE node, unsigned int basementnodesize);
int toku_serialize_brtnode_to_memory (BRTNODE node,
BRTNODE_DISK_DATA* ndd,
unsigned int basementnodesize,
enum toku_compression_method compression_method,
BOOL do_rebalancing,
BOOL in_parallel,
/*out*/ size_t *n_bytes_to_write,
......@@ -721,7 +722,7 @@ void toku_create_new_brtnode (BRT t, BRTNODE *result, int height, int n_children
// Effect: Fill in N as an empty brtnode.
void toku_initialize_empty_brtnode (BRTNODE n, BLOCKNUM nodename, int height, int num_children,
int layout_version, unsigned int nodesize, unsigned int flags, struct brt_header *h);
int layout_version, unsigned int nodesize, unsigned int flags);
unsigned int toku_brtnode_which_child(BRTNODE node, const DBT *k,
DESCRIPTOR desc, brt_compare_func cmp)
......
......@@ -670,20 +670,24 @@ rebalance_brtnode_leaf(BRTNODE node, unsigned int basementnodesize)
} // end of rebalance_brtnode_leaf()
static void
serialize_and_compress_partition(BRTNODE node, int childnum, SUB_BLOCK sb)
serialize_and_compress_partition(BRTNODE node,
int childnum,
enum toku_compression_method compression_method,
SUB_BLOCK sb)
{
serialize_brtnode_partition(node, childnum, sb);
compress_brtnode_sub_block(sb, node->h->compression_method);
compress_brtnode_sub_block(sb, compression_method);
}
void
toku_create_compressed_partition_from_available(
BRTNODE node,
int childnum,
enum toku_compression_method compression_method,
SUB_BLOCK sb
)
{
serialize_and_compress_partition(node, childnum, sb);
serialize_and_compress_partition(node, childnum, compression_method, sb);
//
// now we have an sb that would be ready for being written out,
// but we are not writing it out, we are storing it in cache for a potentially
......@@ -710,9 +714,12 @@ toku_create_compressed_partition_from_available(
static void
serialize_and_compress_serially(BRTNODE node, int npartitions, struct sub_block sb[]) {
serialize_and_compress_serially(BRTNODE node,
int npartitions,
enum toku_compression_method compression_method,
struct sub_block sb[]) {
for (int i = 0; i < npartitions; i++) {
serialize_and_compress_partition(node, i, &sb[i]);
serialize_and_compress_partition(node, i, compression_method, &sb[i]);
}
}
......@@ -720,6 +727,7 @@ struct serialize_compress_work {
struct work base;
BRTNODE node;
int i;
enum toku_compression_method compression_method;
struct sub_block *sb;
};
......@@ -731,16 +739,19 @@ serialize_and_compress_worker(void *arg) {
if (w == NULL)
break;
int i = w->i;
serialize_and_compress_partition(w->node, i, &w->sb[i]);
serialize_and_compress_partition(w->node, i, w->compression_method, &w->sb[i]);
}
workset_release_ref(ws);
return arg;
}
static void
serialize_and_compress_in_parallel(BRTNODE node, int npartitions, struct sub_block sb[]) {
serialize_and_compress_in_parallel(BRTNODE node,
int npartitions,
enum toku_compression_method compression_method,
struct sub_block sb[]) {
if (npartitions == 1) {
serialize_and_compress_partition(node, 0, &sb[0]);
serialize_and_compress_partition(node, 0, compression_method, &sb[0]);
} else {
int T = num_cores;
if (T > npartitions)
......@@ -752,7 +763,10 @@ serialize_and_compress_in_parallel(BRTNODE node, int npartitions, struct sub_blo
struct serialize_compress_work work[npartitions];
workset_lock(&ws);
for (int i = 0; i < npartitions; i++) {
work[i] = (struct serialize_compress_work) { .node = node, .i = i, .sb = sb };
work[i] = (struct serialize_compress_work) { .node = node,
.i = i,
.compression_method = compression_method,
.sb = sb };
workset_put_locked(&ws, &work[i].base);
}
workset_unlock(&ws);
......@@ -773,6 +787,7 @@ int
toku_serialize_brtnode_to_memory (BRTNODE node,
BRTNODE_DISK_DATA* ndd,
unsigned int basementnodesize,
enum toku_compression_method compression_method,
BOOL do_rebalancing,
BOOL in_parallel, // for loader is TRUE, for toku_brtnode_flush_callback, is false
/*out*/ size_t *n_bytes_to_write,
......@@ -800,17 +815,17 @@ toku_serialize_brtnode_to_memory (BRTNODE node,
// First, let's serialize and compress the individual sub blocks
//
if (in_parallel) {
serialize_and_compress_in_parallel(node, npartitions, sb);
serialize_and_compress_in_parallel(node, npartitions, compression_method, sb);
}
else {
serialize_and_compress_serially(node, npartitions, sb);
serialize_and_compress_serially(node, npartitions, compression_method, sb);
}
//
// Now lets create a sub-block that has the common node information,
// This does NOT include the header
//
serialize_brtnode_info(node, &sb_node_info);
compress_brtnode_sub_block(&sb_node_info, node->h->compression_method);
compress_brtnode_sub_block(&sb_node_info, compression_method);
// now we have compressed each of our pieces into individual sub_blocks,
// we can put the header and all the subblocks into a single buffer
......@@ -893,12 +908,13 @@ toku_serialize_brtnode_to (int fd, BLOCKNUM blocknum, BRTNODE node, BRTNODE_DISK
// alternatively, we could have made in_parallel a parameter
// for toku_serialize_brtnode_to, but instead we did this.
int r = toku_serialize_brtnode_to_memory(
node,
ndd,
h->basementnodesize,
node,
ndd,
h->basementnodesize,
h->compression_method,
do_rebalancing,
FALSE, // in_parallel
&n_to_write,
&n_to_write,
&compressed_buf
);
if (r!=0) return r;
......
......@@ -666,7 +666,6 @@ void toku_brtnode_clone_callback(
}
cloned_node->max_msn_applied_to_node_on_disk = node->max_msn_applied_to_node_on_disk;
cloned_node->h = node->h;
cloned_node->nodesize = node->nodesize;
cloned_node->flags = node->flags;
cloned_node->thisnodename = node->thisnodename;
......@@ -800,7 +799,6 @@ int toku_brtnode_fetch_callback (CACHEFILE UU(cachefile), int fd, BLOCKNUM noden
}
if (r == 0) {
(*node)->h = bfe->h; // copy reference to header from bfe
*sizep = make_brtnode_pair_attr(*node);
*dirtyp = (*node)->dirty; // deserialize could mark the node as dirty (presumably for upgrade)
}
......@@ -857,7 +855,7 @@ void toku_brtnode_pe_est_callback(
}
static void
compress_internal_node_partition(BRTNODE node, int i)
compress_internal_node_partition(BRTNODE node, int i, enum toku_compression_method compression_method)
{
// if we should evict, compress the
// message buffer into a sub_block
......@@ -866,7 +864,7 @@ compress_internal_node_partition(BRTNODE node, int i)
SUB_BLOCK sb = NULL;
sb = toku_xmalloc(sizeof(struct sub_block));
sub_block_init(sb);
toku_create_compressed_partition_from_available(node, i, sb);
toku_create_compressed_partition_from_available(node, i, compression_method, sb);
// now free the old partition and replace it with this
destroy_nonleaf_childinfo(BNC(node,i));
......@@ -907,7 +905,7 @@ int toku_brtnode_pe_callback (void *brtnode_pv, PAIR_ATTR UU(old_attr), PAIR_ATT
if (BP_STATE(node,i) == PT_AVAIL) {
if (BP_SHOULD_EVICT(node,i)) {
STATUS_VALUE(BRT_PARTIAL_EVICTIONS_NONLEAF)++;
cilk_spawn compress_internal_node_partition(node, i);
cilk_spawn compress_internal_node_partition(node, i, h->compression_method);
}
else {
BP_SWEEP_CLOCK(node,i);
......@@ -1247,7 +1245,7 @@ void toku_brtnode_free (BRTNODE *nodep) {
}
void
toku_initialize_empty_brtnode (BRTNODE n, BLOCKNUM nodename, int height, int num_children, int layout_version, unsigned int nodesize, unsigned int flags, struct brt_header *h)
toku_initialize_empty_brtnode (BRTNODE n, BLOCKNUM nodename, int height, int num_children, int layout_version, unsigned int nodesize, unsigned int flags)
// Effect: Fill in N as an empty brtnode.
{
assert(layout_version != 0);
......@@ -1259,7 +1257,6 @@ toku_initialize_empty_brtnode (BRTNODE n, BLOCKNUM nodename, int height, int num
STATUS_VALUE(BRT_CREATE_NONLEAF)++;
n->max_msn_applied_to_node_on_disk = ZERO_MSN; // correct value for root node, harmless for others
n->h = h;
n->nodesize = nodesize;
n->flags = flags;
n->thisnodename = nodename;
......@@ -1305,7 +1302,7 @@ brt_init_new_root(struct brt_header *h, BRTNODE nodea, BRTNODE nodeb, DBT splitk
assert(newroot);
*rootp=newroot_diskoff;
assert(new_height > 0);
toku_initialize_empty_brtnode (newroot, newroot_diskoff, new_height, 2, h->layout_version, h->nodesize, h->flags, h);
toku_initialize_empty_brtnode (newroot, newroot_diskoff, new_height, 2, h->layout_version, h->nodesize, h->flags);
//printf("new_root %lld %d %lld %lld\n", newroot_diskoff, newroot->height, nodea->thisnodename, nodeb->thisnodename);
//printf("%s:%d Splitkey=%p %s\n", __FILE__, __LINE__, splitkey, splitkey);
toku_copyref_dbt(&newroot->childkeys[0], splitk);
......
......@@ -341,7 +341,7 @@ brtheader_note_unpin_by_checkpoint (CACHEFILE UU(cachefile), void *header_v)
static int setup_initial_brtheader_root_node (struct brt_header* h, BLOCKNUM blocknum) {
BRTNODE XMALLOC(node);
toku_initialize_empty_brtnode(node, blocknum, 0, 1, h->layout_version, h->nodesize, h->flags, h);
toku_initialize_empty_brtnode(node, blocknum, 0, 1, h->layout_version, h->nodesize, h->flags);
BP_STATE(node,0) = PT_AVAIL;
u_int32_t fullhash = toku_cachetable_hash(h->cf, blocknum);
......
......@@ -2134,15 +2134,15 @@ static struct leaf_buf *start_leaf (struct dbout *out, const DESCRIPTOR UU(desc)
}
BRTNODE XMALLOC(node);
toku_initialize_empty_brtnode(node, lbuf->blocknum, 0 /*height*/, 1 /*basement nodes*/, BRT_LAYOUT_VERSION, target_nodesize, 0, out->h);
toku_initialize_empty_brtnode(node, lbuf->blocknum, 0 /*height*/, 1 /*basement nodes*/, BRT_LAYOUT_VERSION, target_nodesize, 0);
BP_STATE(node, 0) = PT_AVAIL;
lbuf->node = node;
return lbuf;
}
static void finish_leafnode (struct dbout *out, struct leaf_buf *lbuf, int progress_allocation, BRTLOADER bl, uint32_t target_basementnodesize);
static int write_nonleaves (BRTLOADER bl, FIDX pivots_fidx, struct dbout *out, struct subtrees_info *sts, const DESCRIPTOR descriptor, uint32_t target_nodesize, uint32_t target_basementnodesize);
static void finish_leafnode (struct dbout *out, struct leaf_buf *lbuf, int progress_allocation, BRTLOADER bl, uint32_t target_basementnodesize, enum toku_compression_method target_compression_method);
static int write_nonleaves (BRTLOADER bl, FIDX pivots_fidx, struct dbout *out, struct subtrees_info *sts, const DESCRIPTOR descriptor, uint32_t target_nodesize, uint32_t target_basementnodesize, enum toku_compression_method target_compression_method);
static void add_pair_to_leafnode (struct leaf_buf *lbuf, unsigned char *key, int keylen, unsigned char *val, int vallen, int this_leafentry_size, STAT64INFO stats_to_update);
static int write_translation_table (struct dbout *out, long long *off_of_translation_p);
static int write_header (struct dbout *out, long long translation_location_on_disk, long long translation_size_on_disk);
......@@ -2316,7 +2316,7 @@ static int toku_loader_write_brt_from_q (BRTLOADER bl,
break;
}
cilk_spawn finish_leafnode(&out, lbuf, progress_this_node, bl, target_basementnodesize);
cilk_spawn finish_leafnode(&out, lbuf, progress_this_node, bl, target_basementnodesize, target_compression_method);
lbuf = NULL;
r = allocate_block(&out, &lblock);
......@@ -2354,7 +2354,7 @@ static int toku_loader_write_brt_from_q (BRTLOADER bl,
allocate_node(&sts, lblock);
{
int p = progress_allocation/2;
finish_leafnode(&out, lbuf, p, bl, target_basementnodesize);
finish_leafnode(&out, lbuf, p, bl, target_basementnodesize, target_compression_method);
progress_allocation -= p;
}
}
......@@ -2380,7 +2380,7 @@ static int toku_loader_write_brt_from_q (BRTLOADER bl,
}
}
r = write_nonleaves(bl, pivots_file, &out, &sts, descriptor, target_nodesize, target_basementnodesize);
r = write_nonleaves(bl, pivots_file, &out, &sts, descriptor, target_nodesize, target_basementnodesize, target_compression_method);
if (r) {
result = r; goto error;
}
......@@ -2710,14 +2710,14 @@ static int write_literal(struct dbout *out, void*data, size_t len) {
return result;
}
static void finish_leafnode (struct dbout *out, struct leaf_buf *lbuf, int progress_allocation, BRTLOADER bl, uint32_t target_basementnodesize) {
static void finish_leafnode (struct dbout *out, struct leaf_buf *lbuf, int progress_allocation, BRTLOADER bl, uint32_t target_basementnodesize, enum toku_compression_method target_compression_method) {
int result = 0;
// serialize leaf to buffer
size_t serialized_leaf_size = 0;
char *serialized_leaf = NULL;
BRTNODE_DISK_DATA ndd = NULL;
result = toku_serialize_brtnode_to_memory(lbuf->node, &ndd, target_basementnodesize, TRUE, TRUE, &serialized_leaf_size, &serialized_leaf);
result = toku_serialize_brtnode_to_memory(lbuf->node, &ndd, target_basementnodesize, target_compression_method, TRUE, TRUE, &serialized_leaf_size, &serialized_leaf);
// write it out
if (result == 0) {
......@@ -2895,7 +2895,7 @@ static int setup_nonleaf_block (int n_children,
static void write_nonleaf_node (BRTLOADER bl, struct dbout *out, int64_t blocknum_of_new_node, int n_children,
DBT *pivots, /* must free this array, as well as the things it points t */
struct subtree_info *subtree_info, int height, const DESCRIPTOR UU(desc), uint32_t target_nodesize, uint32_t target_basementnodesize)
struct subtree_info *subtree_info, int height, const DESCRIPTOR UU(desc), uint32_t target_nodesize, uint32_t target_basementnodesize, enum toku_compression_method target_compression_method)
{
//Nodes do not currently touch descriptors
invariant(height > 0);
......@@ -2904,7 +2904,7 @@ static void write_nonleaf_node (BRTLOADER bl, struct dbout *out, int64_t blocknu
BRTNODE XMALLOC(node);
toku_initialize_empty_brtnode(node, make_blocknum(blocknum_of_new_node), height, n_children,
BRT_LAYOUT_VERSION, target_nodesize, 0, out->h);
BRT_LAYOUT_VERSION, target_nodesize, 0);
node->totalchildkeylens = 0;
for (int i=0; i<n_children-1; i++) {
toku_clone_dbt(&node->childkeys[i], pivots[i]);
......@@ -2921,7 +2921,7 @@ static void write_nonleaf_node (BRTLOADER bl, struct dbout *out, int64_t blocknu
size_t n_bytes;
char *bytes;
int r;
r = toku_serialize_brtnode_to_memory(node, &ndd, target_basementnodesize, TRUE, TRUE, &n_bytes, &bytes);
r = toku_serialize_brtnode_to_memory(node, &ndd, target_basementnodesize, target_compression_method, TRUE, TRUE, &n_bytes, &bytes);
if (r) {
result = r;
} else {
......@@ -2958,7 +2958,7 @@ static void write_nonleaf_node (BRTLOADER bl, struct dbout *out, int64_t blocknu
brt_loader_set_panic(bl, result, TRUE);
}
static int write_nonleaves (BRTLOADER bl, FIDX pivots_fidx, struct dbout *out, struct subtrees_info *sts, const DESCRIPTOR descriptor, uint32_t target_nodesize, uint32_t target_basementnodesize) {
static int write_nonleaves (BRTLOADER bl, FIDX pivots_fidx, struct dbout *out, struct subtrees_info *sts, const DESCRIPTOR descriptor, uint32_t target_nodesize, uint32_t target_basementnodesize, enum toku_compression_method target_compression_method) {
int result = 0;
int height = 1;
......@@ -3006,7 +3006,7 @@ static int write_nonleaves (BRTLOADER bl, FIDX pivots_fidx, struct dbout *out, s
result = r;
break;
} else {
cilk_spawn write_nonleaf_node(bl, out, blocknum_of_new_node, n_per_block, pivots, subtree_info, height, descriptor, target_nodesize, target_basementnodesize); // frees all the data structures that go into making the node.
cilk_spawn write_nonleaf_node(bl, out, blocknum_of_new_node, n_per_block, pivots, subtree_info, height, descriptor, target_nodesize, target_basementnodesize, target_compression_method); // frees all the data structures that go into making the node.
n_subtrees_used += n_per_block;
}
}
......@@ -3029,7 +3029,7 @@ static int write_nonleaves (BRTLOADER bl, FIDX pivots_fidx, struct dbout *out, s
if (r) {
result = r;
} else {
cilk_spawn write_nonleaf_node(bl, out, blocknum_of_new_node, n_first, pivots, subtree_info, height, descriptor, target_nodesize, target_basementnodesize);
cilk_spawn write_nonleaf_node(bl, out, blocknum_of_new_node, n_first, pivots, subtree_info, height, descriptor, target_nodesize, target_basementnodesize, target_compression_method);
n_blocks_left -= n_first;
n_subtrees_used += n_first;
}
......@@ -3048,7 +3048,7 @@ static int write_nonleaves (BRTLOADER bl, FIDX pivots_fidx, struct dbout *out, s
if (r) {
result = r;
} else {
cilk_spawn write_nonleaf_node(bl, out, blocknum_of_new_node, n_blocks_left, pivots, subtree_info, height, descriptor, target_nodesize, target_basementnodesize);
cilk_spawn write_nonleaf_node(bl, out, blocknum_of_new_node, n_blocks_left, pivots, subtree_info, height, descriptor, target_nodesize, target_basementnodesize, target_compression_method);
n_subtrees_used += n_blocks_left;
}
}
......
......@@ -273,7 +273,7 @@ flush_to_internal(BRT t) {
BRTNODE XMALLOC(child);
BLOCKNUM blocknum = { 42 };
toku_initialize_empty_brtnode(child, blocknum, 1, 1, BRT_LAYOUT_VERSION, 128*1024, 0, my_header);
toku_initialize_empty_brtnode(child, blocknum, 1, 1, BRT_LAYOUT_VERSION, 128*1024, 0);
destroy_nonleaf_childinfo(BNC(child, 0));
set_BNC(child, 0, child_bnc);
BP_STATE(child, 0) = PT_AVAIL;
......@@ -403,7 +403,7 @@ flush_to_internal_multiple(BRT t) {
BRTNODE XMALLOC(child);
BLOCKNUM blocknum = { 42 };
toku_initialize_empty_brtnode(child, blocknum, 1, 8, BRT_LAYOUT_VERSION, 128*1024, 0, my_header);
toku_initialize_empty_brtnode(child, blocknum, 1, 8, BRT_LAYOUT_VERSION, 128*1024, 0);
for (i = 0; i < 8; ++i) {
destroy_nonleaf_childinfo(BNC(child, i));
set_BNC(child, i, child_bncs[i]);
......@@ -534,7 +534,7 @@ flush_to_leaf(BRT t, bool make_leaf_up_to_date, bool use_flush) {
BRTNODE XMALLOC(child);
BLOCKNUM blocknum = { 42 };
toku_initialize_empty_brtnode(child, blocknum, 0, 8, BRT_LAYOUT_VERSION, 128*1024, 0, my_header);
toku_initialize_empty_brtnode(child, blocknum, 0, 8, BRT_LAYOUT_VERSION, 128*1024, 0);
for (i = 0; i < 8; ++i) {
destroy_basement_node(BLB(child, i));
set_BLB(child, i, child_blbs[i]);
......@@ -610,7 +610,7 @@ flush_to_leaf(BRT t, bool make_leaf_up_to_date, bool use_flush) {
} else {
BRTNODE XMALLOC(parentnode);
BLOCKNUM parentblocknum = { 17 };
toku_initialize_empty_brtnode(parentnode, parentblocknum, 1, 1, BRT_LAYOUT_VERSION, 128*1024, 0, my_header);
toku_initialize_empty_brtnode(parentnode, parentblocknum, 1, 1, BRT_LAYOUT_VERSION, 128*1024, 0);
destroy_nonleaf_childinfo(BNC(parentnode, 0));
set_BNC(parentnode, 0, parent_bnc);
BP_STATE(parentnode, 0) = PT_AVAIL;
......@@ -761,7 +761,7 @@ flush_to_leaf_with_keyrange(BRT t, bool make_leaf_up_to_date) {
BRTNODE XMALLOC(child);
BLOCKNUM blocknum = { 42 };
toku_initialize_empty_brtnode(child, blocknum, 0, 8, BRT_LAYOUT_VERSION, 128*1024, 0, my_header);
toku_initialize_empty_brtnode(child, blocknum, 0, 8, BRT_LAYOUT_VERSION, 128*1024, 0);
for (i = 0; i < 8; ++i) {
destroy_basement_node(BLB(child, i));
set_BLB(child, i, child_blbs[i]);
......@@ -832,7 +832,7 @@ flush_to_leaf_with_keyrange(BRT t, bool make_leaf_up_to_date) {
BRTNODE XMALLOC(parentnode);
BLOCKNUM parentblocknum = { 17 };
toku_initialize_empty_brtnode(parentnode, parentblocknum, 1, 1, BRT_LAYOUT_VERSION, 128*1024, 0, my_header);
toku_initialize_empty_brtnode(parentnode, parentblocknum, 1, 1, BRT_LAYOUT_VERSION, 128*1024, 0);
destroy_nonleaf_childinfo(BNC(parentnode, 0));
set_BNC(parentnode, 0, parent_bnc);
BP_STATE(parentnode, 0) = PT_AVAIL;
......@@ -944,8 +944,8 @@ compare_apply_and_flush(BRT t, bool make_leaf_up_to_date) {
BRTNODE XMALLOC(child1), XMALLOC(child2);
BLOCKNUM blocknum = { 42 };
toku_initialize_empty_brtnode(child1, blocknum, 0, 8, BRT_LAYOUT_VERSION, 128*1024, 0, my_header);
toku_initialize_empty_brtnode(child2, blocknum, 0, 8, BRT_LAYOUT_VERSION, 128*1024, 0, my_header);
toku_initialize_empty_brtnode(child1, blocknum, 0, 8, BRT_LAYOUT_VERSION, 128*1024, 0);
toku_initialize_empty_brtnode(child2, blocknum, 0, 8, BRT_LAYOUT_VERSION, 128*1024, 0);
for (i = 0; i < 8; ++i) {
destroy_basement_node(BLB(child1, i));
set_BLB(child1, i, child1_blbs[i]);
......@@ -1020,7 +1020,7 @@ compare_apply_and_flush(BRT t, bool make_leaf_up_to_date) {
BRTNODE XMALLOC(parentnode);
BLOCKNUM parentblocknum = { 17 };
toku_initialize_empty_brtnode(parentnode, parentblocknum, 1, 1, BRT_LAYOUT_VERSION, 128*1024, 0, my_header);
toku_initialize_empty_brtnode(parentnode, parentblocknum, 1, 1, BRT_LAYOUT_VERSION, 128*1024, 0);
destroy_nonleaf_childinfo(BNC(parentnode, 0));
set_BNC(parentnode, 0, parent_bnc);
BP_STATE(parentnode, 0) = PT_AVAIL;
......
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