mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 03:51:50 +01:00
git-svn-id: file:///svn/toku/tokudb.1195@7705 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
0cb7def202
commit
ab0ac5ad70
3 changed files with 7 additions and 2 deletions
|
@ -284,4 +284,9 @@ int toku_brtheader_close (CACHEFILE cachefile, void *header_v);
|
|||
|
||||
#define BLOCK_ALLOCATOR_ALIGNMENT 4096
|
||||
|
||||
// How much must be reserved at the beginning for the block?
|
||||
// The actual header is 8+4+4+8+8_4+8+ the length of the db names + 1 pointer for each root.
|
||||
// So 4096 should be enough.
|
||||
#define BLOCK_ALLOCATOR_HEADER_RESERVE 4096
|
||||
|
||||
#endif
|
||||
|
|
|
@ -749,7 +749,7 @@ deserialize_brtheader (u_int32_t size, int fd, DISKOFF off, struct brt_header **
|
|||
h->block_translation_size_on_disk = 4 + 16 * h->translated_blocknum_limit;
|
||||
h->block_translation_address_on_disk = rbuf_diskoff(&rc);
|
||||
// Set up the the block translation buffer.
|
||||
create_block_allocator(&h->block_allocator, h->nodesize, BLOCK_ALLOCATOR_ALIGNMENT);
|
||||
create_block_allocator(&h->block_allocator, BLOCK_ALLOCATOR_HEADER_RESERVE, BLOCK_ALLOCATOR_ALIGNMENT);
|
||||
// printf("%s:%d translated_blocknum_limit=%ld, block_translation_address_on_disk=%ld\n", __FILE__, __LINE__, h->translated_blocknum_limit, h->block_translation_address_on_disk);
|
||||
if (h->block_translation_address_on_disk == 0) {
|
||||
h->block_translation = 0;
|
||||
|
|
|
@ -2665,7 +2665,7 @@ static int brt_alloc_init_header(BRT t, const char *dbname, TOKUTXN txn) {
|
|||
t->h->block_translation_size_on_disk = 0;
|
||||
t->h->block_translation_address_on_disk = 0;
|
||||
// printf("%s:%d translated_blocknum_limit=%ld, block_translation_address_on_disk=%ld\n", __FILE__, __LINE__, t->h->translated_blocknum_limit, t->h->block_translation_address_on_disk);
|
||||
create_block_allocator(&t->h->block_allocator, t->nodesize, BLOCK_ALLOCATOR_ALIGNMENT);
|
||||
create_block_allocator(&t->h->block_allocator, BLOCK_ALLOCATOR_HEADER_RESERVE, BLOCK_ALLOCATOR_ALIGNMENT);
|
||||
toku_fifo_create(&t->h->fifo);
|
||||
t->h->root_put_counter = global_root_put_counter++;
|
||||
if (dbname) {
|
||||
|
|
Loading…
Add table
Reference in a new issue