Commit 31d8410f authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel

Use {{{size_factor}}} to size rowsets. Fixes #2628. close[t:2628]

git-svn-id: file:///svn/toku/tokudb@20375 c7de825b-a66e-492c-adef-691d508d4ae1
parent 1f6c123a
......@@ -332,6 +332,9 @@ static void *extractor_thread (void*);
static uint64_t memory_per_rowset (BRTLOADER bl)
// Return how much memory can be allocated for each rowset.
{
if (size_factor==1) {
return 16*1024;
} else {
// There is a primary rowset being maintained by the foreground thread.
// There could be two more in the queue.
// There is one rowset for each index (bl->N) being filled in.
......@@ -344,6 +347,7 @@ static uint64_t memory_per_rowset (BRTLOADER bl)
int64_t extra_reserved_memory = bl->N * FILE_BUFFER_SIZE; // for each index we are writing to a file at any given time.
int64_t tentative_rowset_size = ((int64_t)(bl->reserved_memory - extra_reserved_memory))/(n_copies);
return MAX(tentative_rowset_size, (int64_t)MIN_ROWSET_MEMORY);
}
}
static int merge_fanin (BRTLOADER bl)
......
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