B-tree is slower...
This commit is contained in:
@@ -2,8 +2,13 @@
|
||||
// Copyright (c) Vitaliy Filippov, 2025+
|
||||
// License: VNPL-1.1 (see README.md for details)
|
||||
|
||||
#include "blockstore_heap.h"
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <stdexcept>
|
||||
#include <algorithm>
|
||||
|
||||
#include "blockstore_heap.h"
|
||||
#include "../util/allocator.h"
|
||||
#include "../util/crc32c.h"
|
||||
#include "../util/malloc_or_die.h"
|
||||
@@ -813,7 +818,7 @@ void blockstore_heap_t::reshard(pool_id_t pool, uint32_t pg_count, uint32_t pg_s
|
||||
return;
|
||||
}
|
||||
uint64_t pool_id = (uint64_t)pool;
|
||||
std::map<uint64_t, std::map<inode_t, btree::btree_map<uint64_t, uint64_t>>> new_shards;
|
||||
std::map<uint64_t, std::map<inode_t, std::map<uint64_t, uint64_t>>> new_shards;
|
||||
auto sh_it = block_index.lower_bound((pool_id << (64-POOL_ID_BITS)));
|
||||
while (sh_it != block_index.end() && (sh_it->first >> (64-POOL_ID_BITS)) == pool_id)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "../client/object_id.h"
|
||||
#include "../../cpp-btree/btree_map.h"
|
||||
//#include "../../cpp-btree/btree_map.h"
|
||||
#include "blockstore_disk.h"
|
||||
#include "multilist.h"
|
||||
|
||||
@@ -139,7 +139,7 @@ class blockstore_heap_t
|
||||
uint64_t next_lsn = 0;
|
||||
std::unordered_map<pool_id_t, pool_shard_settings_t> pool_shard_settings;
|
||||
// PG => inode => stripe => block number
|
||||
std::map<uint64_t, std::map<inode_t, btree::btree_map<uint64_t, uint64_t>>> block_index;
|
||||
std::map<uint64_t, std::map<inode_t, std::map<uint64_t, uint64_t>>> block_index;
|
||||
std::vector<heap_block_info_t> block_info;
|
||||
allocator_t *data_alloc = NULL;
|
||||
multilist_index_t *meta_alloc = NULL;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) Vitaliy Filippov, 2019+
|
||||
// License: VNPL-1.1 (see README.md for details)
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#include "blockstore_impl.h"
|
||||
#include "blockstore_internal.h"
|
||||
#include "crc32c.h"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) Vitaliy Filippov, 2019+
|
||||
// License: VNPL-1.1 (see README.md for details)
|
||||
|
||||
#include <stdexcept>
|
||||
#include "blockstore_impl.h"
|
||||
#include "blockstore_internal.h"
|
||||
#include "str_util.h"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// License: VNPL-1.1 (see README.md for details)
|
||||
|
||||
#include <sys/file.h>
|
||||
#include <stdexcept>
|
||||
#include "blockstore_impl.h"
|
||||
|
||||
void blockstore_impl_t::parse_config(blockstore_config_t & config)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include "../util/malloc_or_die.h"
|
||||
#include "../util/allocator.h"
|
||||
|
||||
Reference in New Issue
Block a user