From b4c24f450609fdac9155860ca50490ff145147b0 Mon Sep 17 00:00:00 2001 From: jbajic Date: Mon, 14 Nov 2022 10:23:48 +0100 Subject: [PATCH] Remvoe storage.hpp and storage.cpp files --- src/query/v2/db_accessor.hpp | 2 +- src/query/v2/interpreter.cpp | 1 - src/storage/v3/CMakeLists.txt | 4 +-- src/storage/v3/shard_rsm.cpp | 1 - src/storage/v3/storage.cpp | 20 ----------- src/storage/v3/storage.hpp | 34 ------------------- tests/unit/query_v2_query_plan_common.hpp | 2 +- ...v2_query_plan_create_set_remove_delete.cpp | 2 +- tests/unit/query_v2_query_plan_edge_cases.cpp | 2 +- ...query_plan_v2_create_set_remove_delete.cpp | 2 +- tests/unit/result_stream_faker.hpp | 2 +- tests/unit/storage_v3_indices.cpp | 2 +- tests/unit/storage_v3_isolation_level.cpp | 2 +- tests/unit/storage_v3_schema.cpp | 2 +- tests/unit/storage_v3_test_utils.hpp | 2 +- 15 files changed, 11 insertions(+), 69 deletions(-) delete mode 100644 src/storage/v3/storage.cpp delete mode 100644 src/storage/v3/storage.hpp diff --git a/src/query/v2/db_accessor.hpp b/src/query/v2/db_accessor.hpp index b76da6131..29bbbb7fd 100644 --- a/src/query/v2/db_accessor.hpp +++ b/src/query/v2/db_accessor.hpp @@ -37,7 +37,7 @@ // This cannot be avoided by simple include orderings so we // simply undefine those macros as we're sure that libkrb5 // won't and can't be used anywhere in the query engine. -#include "storage/v3/storage.hpp" +#include "storage/v3/shard.hpp" #include "utils/logging.hpp" #include "utils/result.hpp" diff --git a/src/query/v2/interpreter.cpp b/src/query/v2/interpreter.cpp index c835c3d27..94a41aee5 100644 --- a/src/query/v2/interpreter.cpp +++ b/src/query/v2/interpreter.cpp @@ -47,7 +47,6 @@ #include "query/v2/shard_request_manager.hpp" #include "storage/v3/property_value.hpp" #include "storage/v3/shard.hpp" -#include "storage/v3/storage.hpp" #include "utils/algorithm.hpp" #include "utils/csv_parsing.hpp" #include "utils/event_counter.hpp" diff --git a/src/storage/v3/CMakeLists.txt b/src/storage/v3/CMakeLists.txt index 0f359c702..5a824534b 100644 --- a/src/storage/v3/CMakeLists.txt +++ b/src/storage/v3/CMakeLists.txt @@ -16,12 +16,10 @@ set(storage_v3_src_files schemas.cpp schema_validator.cpp shard.cpp - storage.cpp shard_rsm.cpp bindings/typed_value.cpp expr.cpp - request_helper.cpp - storage.cpp) + request_helper.cpp) # ###################### find_package(gflags REQUIRED) diff --git a/src/storage/v3/shard_rsm.cpp b/src/storage/v3/shard_rsm.cpp index f288e5e27..5215db6c3 100644 --- a/src/storage/v3/shard_rsm.cpp +++ b/src/storage/v3/shard_rsm.cpp @@ -37,7 +37,6 @@ #include "storage/v3/schemas.hpp" #include "storage/v3/shard.hpp" #include "storage/v3/shard_rsm.hpp" -#include "storage/v3/storage.hpp" #include "storage/v3/value_conversions.hpp" #include "storage/v3/vertex_accessor.hpp" #include "storage/v3/vertex_id.hpp" diff --git a/src/storage/v3/storage.cpp b/src/storage/v3/storage.cpp deleted file mode 100644 index 28fd8b330..000000000 --- a/src/storage/v3/storage.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2022 Memgraph Ltd. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source -// License, and you may not use this file except in compliance with the Business Source License. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -#include "storage/v3/storage.hpp" - -#include "storage/v3/config.hpp" - -namespace memgraph::storage::v3 { - -Storage::Storage(Config config) : config_{config} {} - -} // namespace memgraph::storage::v3 diff --git a/src/storage/v3/storage.hpp b/src/storage/v3/storage.hpp deleted file mode 100644 index 9305ba707..000000000 --- a/src/storage/v3/storage.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2022 Memgraph Ltd. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source -// License, and you may not use this file except in compliance with the Business Source License. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -#pragma once - -#include - -#include - -#include "storage/v3/shard.hpp" - -namespace memgraph::storage::v3 { - -class Storage { - public: - explicit Storage(Config config); - // Interface toward shard manipulation - // Shard handler -> will use rsm client - - private: - std::vector shards_; - boost::asio::thread_pool shard_handlers_; - Config config_; -}; - -} // namespace memgraph::storage::v3 diff --git a/tests/unit/query_v2_query_plan_common.hpp b/tests/unit/query_v2_query_plan_common.hpp index c74f65f60..4f6c1a539 100644 --- a/tests/unit/query_v2_query_plan_common.hpp +++ b/tests/unit/query_v2_query_plan_common.hpp @@ -21,7 +21,7 @@ #include "query/v2/context.hpp" #include "query/v2/db_accessor.hpp" #include "query/v2/plan/operator.hpp" -#include "storage/v3/storage.hpp" +#include "storage/v3/shard.hpp" #include "utils/logging.hpp" #include "query_v2_query_common.hpp" diff --git a/tests/unit/query_v2_query_plan_create_set_remove_delete.cpp b/tests/unit/query_v2_query_plan_create_set_remove_delete.cpp index 78ccc281e..2487e378e 100644 --- a/tests/unit/query_v2_query_plan_create_set_remove_delete.cpp +++ b/tests/unit/query_v2_query_plan_create_set_remove_delete.cpp @@ -30,7 +30,7 @@ #include "storage/v3/id_types.hpp" #include "storage/v3/property_value.hpp" #include "storage/v3/schemas.hpp" -#include "storage/v3/storage.hpp" +#include "storage/v3/shard.hpp" #include "storage/v3/vertex.hpp" #include "storage/v3/view.hpp" diff --git a/tests/unit/query_v2_query_plan_edge_cases.cpp b/tests/unit/query_v2_query_plan_edge_cases.cpp index cf268bc27..2d0a0eef2 100644 --- a/tests/unit/query_v2_query_plan_edge_cases.cpp +++ b/tests/unit/query_v2_query_plan_edge_cases.cpp @@ -21,7 +21,7 @@ #include "query/v2/interpreter.hpp" #include "result_stream_faker.hpp" -#include "storage/v3/storage.hpp" +#include "storage/v3/shard.hpp" DECLARE_bool(query_cost_planner); diff --git a/tests/unit/query_v2_query_plan_v2_create_set_remove_delete.cpp b/tests/unit/query_v2_query_plan_v2_create_set_remove_delete.cpp index 277ca5b6f..c5c9e2001 100644 --- a/tests/unit/query_v2_query_plan_v2_create_set_remove_delete.cpp +++ b/tests/unit/query_v2_query_plan_v2_create_set_remove_delete.cpp @@ -15,7 +15,7 @@ #include "query/v2/plan/operator.hpp" #include "query_v2_query_plan_common.hpp" #include "storage/v3/property_value.hpp" -#include "storage/v3/storage.hpp" +#include "storage/v3/shard.hpp" namespace memgraph::query::v2::tests { diff --git a/tests/unit/result_stream_faker.hpp b/tests/unit/result_stream_faker.hpp index 4aa6a3e1d..b8362db75 100644 --- a/tests/unit/result_stream_faker.hpp +++ b/tests/unit/result_stream_faker.hpp @@ -16,7 +16,7 @@ #include "glue/v2/communication.hpp" #include "query/v2/bindings/typed_value.hpp" -#include "storage/v3/storage.hpp" +#include "storage/v3/shard.hpp" #include "utils/algorithm.hpp" /** diff --git a/tests/unit/storage_v3_indices.cpp b/tests/unit/storage_v3_indices.cpp index 7ff3fa43b..620878fcf 100644 --- a/tests/unit/storage_v3_indices.cpp +++ b/tests/unit/storage_v3_indices.cpp @@ -18,7 +18,7 @@ #include "storage/v3/id_types.hpp" #include "storage/v3/name_id_mapper.hpp" #include "storage/v3/property_value.hpp" -#include "storage/v3/storage.hpp" +#include "storage/v3/shard.hpp" #include "storage/v3/temporal.hpp" #include "storage/v3/view.hpp" diff --git a/tests/unit/storage_v3_isolation_level.cpp b/tests/unit/storage_v3_isolation_level.cpp index 2fe259c00..6b661f632 100644 --- a/tests/unit/storage_v3_isolation_level.cpp +++ b/tests/unit/storage_v3_isolation_level.cpp @@ -13,7 +13,7 @@ #include "storage/v3/isolation_level.hpp" #include "storage/v3/property_value.hpp" -#include "storage/v3/storage.hpp" +#include "storage/v3/shard.hpp" namespace memgraph::storage::v3::tests { int64_t VerticesCount(Shard::Accessor &accessor) { diff --git a/tests/unit/storage_v3_schema.cpp b/tests/unit/storage_v3_schema.cpp index c36b92bc3..5c0d6f1dc 100644 --- a/tests/unit/storage_v3_schema.cpp +++ b/tests/unit/storage_v3_schema.cpp @@ -23,7 +23,7 @@ #include "storage/v3/property_value.hpp" #include "storage/v3/schema_validator.hpp" #include "storage/v3/schemas.hpp" -#include "storage/v3/storage.hpp" +#include "storage/v3/shard.hpp" #include "storage/v3/temporal.hpp" using testing::Pair; diff --git a/tests/unit/storage_v3_test_utils.hpp b/tests/unit/storage_v3_test_utils.hpp index 7cbb7414b..921df0a99 100644 --- a/tests/unit/storage_v3_test_utils.hpp +++ b/tests/unit/storage_v3_test_utils.hpp @@ -11,7 +11,7 @@ #pragma once -#include "storage/v3/storage.hpp" +#include "storage/v3/shard.hpp" #include "storage/v3/view.hpp" namespace memgraph::storage::v3::tests {