Remove unnecessary storage pool, general cleanup
This commit is contained in:
parent
66e791d042
commit
a74a556fcc
@ -90,8 +90,6 @@ class Coordinator {
|
||||
using StandbySotrageEnginePool = std::unordered_set<Address>;
|
||||
|
||||
ShardMap shard_map_;
|
||||
// StandbySotrageEnginePool storage_engine_pool_;
|
||||
|
||||
/// The highest reserved timestamp / highest allocated timestamp
|
||||
/// is a way for minimizing communication involved in query engines
|
||||
/// reserving Hlc's for their transaction processing.
|
||||
@ -158,9 +156,6 @@ class Coordinator {
|
||||
WriteResponses Apply(RegisterStorageEngineRequest &®ister_storage_engine_request) {
|
||||
RegisterStorageEngineResponse res{};
|
||||
// TODO
|
||||
// const Address &address = register_storage_engine_request.address;
|
||||
// storage_engine_pool_.insert(address);
|
||||
// res.success = true;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -33,6 +33,8 @@ struct AddressAndStatus {
|
||||
Status status;
|
||||
};
|
||||
|
||||
using memgraph::io::Address;
|
||||
|
||||
using CompoundKey = std::vector<memgraph::storage::v3::PropertyValue>;
|
||||
using Shard = std::vector<AddressAndStatus>;
|
||||
using Shards = std::map<CompoundKey, Shard>;
|
||||
@ -65,7 +67,7 @@ struct ShardMap {
|
||||
|
||||
// Finding the Shard that the new CompoundKey should map to.
|
||||
Shard shard_to_map_to;
|
||||
auto &prev_key = (*shards_in_map.begin()).first;
|
||||
CompoundKey prev_key = ((*shards_in_map.begin()).first);
|
||||
|
||||
for (auto iter = std::next(shards_in_map.begin()); iter != shards_in_map.end(); ++iter) {
|
||||
const auto ¤t_key = (*iter).first;
|
||||
@ -84,6 +86,10 @@ struct ShardMap {
|
||||
return false;
|
||||
}
|
||||
|
||||
void AddServer(Address server_address) {
|
||||
// Find a random place for the server to plug in
|
||||
}
|
||||
|
||||
Shards GetShardsForRange(Label label, CompoundKey start, CompoundKey end);
|
||||
|
||||
Shard GetShardForKey(Label label, CompoundKey key);
|
||||
|
@ -31,4 +31,4 @@ add_simulation_test(raft.cpp address)
|
||||
|
||||
add_simulation_test(trial_query_storage/query_storage_test.cpp address)
|
||||
|
||||
#add_simulation_test(sharded_map.cpp address)
|
||||
add_simulation_test(sharded_map.cpp address)
|
||||
|
Loading…
Reference in New Issue
Block a user