diff --git a/src/storage/v2/disk/storage.cpp b/src/storage/v2/disk/storage.cpp index c769c82d6..dc5af9b8d 100644 --- a/src/storage/v2/disk/storage.cpp +++ b/src/storage/v2/disk/storage.cpp @@ -551,11 +551,6 @@ VerticesIterable DiskStorage::DiskAccessor::Vertices(LabelId label, View view) { utils::SkipList *indexed_vertices{nullptr}; std::list *index_deltas{nullptr}; - // transaction_.index_storage_.emplace_back(std::make_unique>()); - // auto &indexed_vertices = transaction_.index_storage_.back(); - // transaction_.index_deltas_storage_.emplace_back(); - // auto &index_deltas = transaction_.index_deltas_storage_.back(); - auto merge_with_main_cache = [&](auto &index) -> std::unordered_set { index[cache_key] = utils::SkipList(); indexed_vertices = &index[cache_key]; @@ -583,7 +578,7 @@ VerticesIterable DiskStorage::DiskAccessor::Vertices(LabelId label, View view) { } return VerticesIterable(AllVerticesIterable(indexed_vertices->access(), storage_, &transaction_, view)); -} // namespace memgraph::storage +} VerticesIterable DiskStorage::DiskAccessor::Vertices(LabelId label, PropertyId property, View view) { auto *disk_storage = static_cast(storage_); @@ -598,10 +593,6 @@ VerticesIterable DiskStorage::DiskAccessor::Vertices(LabelId label, PropertyId p utils::SkipList *indexed_vertices{nullptr}; std::list *index_deltas{nullptr}; - // transaction_.index_storage_.emplace_back(std::make_unique>()); - // auto &indexed_vertices = transaction_.index_storage_.back(); - // transaction_.index_deltas_storage_.emplace_back(); - // auto &index_deltas = transaction_.index_deltas_storage_.back(); auto merge_with_main_cache = [&](auto &index) -> std::unordered_set { index[cache_key] = utils::SkipList(); @@ -661,10 +652,6 @@ VerticesIterable DiskStorage::DiskAccessor::Vertices(LabelId label, PropertyId p utils::SkipList *indexed_vertices{nullptr}; std::list *index_deltas{nullptr}; - // transaction_.index_storage_.emplace_back(std::make_unique>()); - // auto &indexed_vertices = transaction_.index_storage_.back(); - // transaction_.index_deltas_storage_.emplace_back(); - // auto &index_deltas = transaction_.index_deltas_storage_.back(); auto merge_with_main_cache = [&](auto &index) -> std::unordered_set { index[cache_key] = utils::SkipList(); @@ -725,10 +712,6 @@ VerticesIterable DiskStorage::DiskAccessor::Vertices(LabelId label, PropertyId p indexed_vertices = &index[cache_key]; transaction_.index_deltas_storage_.emplace_back(); index_deltas = &transaction_.index_deltas_storage_.back(); - // transaction_.index_storage_.emplace_back(std::make_unique>()); - // auto &indexed_vertices = transaction_.index_storage_.back(); - // transaction_.index_deltas_storage_.emplace_back(); - // auto &index_deltas = transaction_.index_deltas_storage_.back(); return MergeVerticesFromMainCacheWithLabelPropertyIndexCacheForIntervalSearch( label, property, view, lower_bound, upper_bound, *index_deltas, *indexed_vertices); @@ -760,8 +743,6 @@ VerticesIterable DiskStorage::DiskAccessor::Vertices(LabelId label, PropertyId p std::unordered_set DiskStorage::DiskAccessor::MergeVerticesFromMainCacheWithLabelIndexCache( LabelId label, View view, std::list &index_deltas, utils::SkipList &indexed_vertices) { auto main_cache_acc = transaction_.vertices_.access(); - // LabelId label, View view, std::list &index_deltas, utils::SkipList *indexed_vertices) { - // auto main_cache_acc = transaction_.vertices_.access(); std::unordered_set gids; gids.reserve(main_cache_acc.size()); @@ -814,8 +795,6 @@ std::unordered_set DiskStorage::DiskAccessor::MergeVerticesFromMainCacheWit LabelId label, PropertyId property, View view, std::list &index_deltas, utils::SkipList &indexed_vertices, const auto &label_property_filter) { auto main_cache_acc = transaction_.vertices_.access(); - // utils::SkipList *indexed_vertices, const auto &label_property_filter) { - // auto main_cache_acc = transaction_.vertices_.access(); std::unordered_set gids; gids.reserve(main_cache_acc.size()); @@ -904,8 +883,6 @@ DiskStorage::DiskAccessor::MergeVerticesFromMainCacheWithLabelPropertyIndexCache const std::optional> &upper_bound, std::list &index_deltas, utils::SkipList &indexed_vertices) { auto main_cache_acc = transaction_.vertices_.access(); - // utils::SkipList *indexed_vertices) { - // auto main_cache_acc = transaction_.vertices_.access(); std::unordered_set gids; gids.reserve(main_cache_acc.size()); diff --git a/src/storage/v2/disk/storage.hpp b/src/storage/v2/disk/storage.hpp index 8d07c0f0d..cbb85d062 100644 --- a/src/storage/v2/disk/storage.hpp +++ b/src/storage/v2/disk/storage.hpp @@ -261,40 +261,7 @@ class DiskStorage final : public Storage { const std::string &dst_vertex_gid); bool DeleteEdgeFromConnectivityIndex(const std::string &vertex_gid, const std::string &edge_gid, rocksdb::ColumnFamilyHandle *handle, std::string mode); - - // bool WriteVertexToDisk(const Vertex &vertex); - // bool WriteEdgeToDisk(const std::string &serialized_edge_key, const std::string &serialized_edge_value); - // bool DeleteVertexFromDisk(const std::string &vertex); - // bool DeleteEdgeFromDisk(const std::string &edge); - - /// Main storage - // utils::SkipList vertices_; - - // using LabelIndex = LabelId; - // using LabelPropertyIndex = std::pair; - // using LabelPropertyValIndex = std::tuple; - // using RangeBoundary = std::optional>; - // using LabelPropertyRangeIndex = std::tuple; - - // std::map> label_index_cache_; - // uint64_t label_index_cache_ci_{transaction_.command_id}; - // std::map> label_property_index_cache_; - // uint64_t label_property_index_cache_ci_{transaction_.command_id}; - // std::map> label_property_val_index_cache_; - // uint64_t label_property_val_index_cache_ci_{transaction_.command_id}; - // std::map> label_property_range_index_cache_; - // uint64_t label_property_range_index_cache_ci_{transaction_.command_id}; - - /// We need them because query context for indexed reading is cleared after the query is done not after the - /// transaction is done - // std::vector> index_deltas_storage_; - // utils::SkipList edges_; - // Config::Items config_; - // std::unordered_set edges_to_delete_; - // std::vector> vertices_to_delete_; - // rocksdb::Transaction *disk_transaction_; - // bool scanned_all_vertices_ = false; - }; // Accessor + }; std::unique_ptr Access(std::optional override_isolation_level) override;