mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 06:22:28 +01:00
refs #6300, fix on main
git-svn-id: file:///svn/toku/tokudb@54569 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
847c166471
commit
73b86e51c4
3 changed files with 4 additions and 2 deletions
|
@ -1220,7 +1220,8 @@ maybe_merge_pinned_leaf_nodes(
|
|||
{
|
||||
unsigned int sizea = toku_serialize_ftnode_size(a);
|
||||
unsigned int sizeb = toku_serialize_ftnode_size(b);
|
||||
if ((sizea + sizeb)*4 > (nodesize*3)) {
|
||||
uint32_t num_leafentries = get_leaf_num_entries(a) + get_leaf_num_entries(b);
|
||||
if (num_leafentries > 1 && (sizea + sizeb)*4 > (nodesize*3)) {
|
||||
// the combined size is more than 3/4 of a node, so don't merge them.
|
||||
*did_merge = false;
|
||||
if (sizea*4 > nodesize && sizeb*4 > nodesize) {
|
||||
|
|
|
@ -155,6 +155,7 @@ bool toku_ft_nonleaf_is_gorged(FTNODE node, uint32_t nodesize);
|
|||
|
||||
enum reactivity get_nonleaf_reactivity (FTNODE node);
|
||||
enum reactivity get_node_reactivity (FTNODE node, uint32_t nodesize);
|
||||
uint32_t get_leaf_num_entries(FTNODE node);
|
||||
|
||||
|
||||
// data of an available partition of a leaf ftnode
|
||||
|
|
|
@ -315,7 +315,7 @@ toku_assert_entire_node_in_memory(FTNODE UU() node) {
|
|||
paranoid_invariant(is_entire_node_in_memory(node));
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
uint32_t
|
||||
get_leaf_num_entries(FTNODE node) {
|
||||
uint32_t result = 0;
|
||||
int i;
|
||||
|
|
Loading…
Reference in a new issue