From 86e5b44c1c89a3f0a0606f6d682d7125bea4b48d Mon Sep 17 00:00:00 2001 From: jeremy Date: Mon, 21 Nov 2022 10:42:15 +0100 Subject: [PATCH] Remove Shard::Accessor (unsued) --- src/storage/v3/request_helper.hpp | 2 +- src/storage/v3/shard_rsm.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/storage/v3/request_helper.hpp b/src/storage/v3/request_helper.hpp index 08094e8ba..44d012f1d 100644 --- a/src/storage/v3/request_helper.hpp +++ b/src/storage/v3/request_helper.hpp @@ -120,7 +120,7 @@ struct Element { template concept VerticesIt = utils::SameAsAnyOf>; template -std::vector> OrderByVertices(Shard::Accessor &acc, DbAccessor &dba, TIterable &iterable, +std::vector> OrderByVertices(DbAccessor &dba, TIterable &iterable, std::vector &original_order_bys) { auto order_bys = original_order_bys; auto it_to_remove = std::remove_if(order_bys.begin(), order_bys.end(), [](const auto &order_by) { diff --git a/src/storage/v3/shard_rsm.cpp b/src/storage/v3/shard_rsm.cpp index 2cf265205..eaf760253 100644 --- a/src/storage/v3/shard_rsm.cpp +++ b/src/storage/v3/shard_rsm.cpp @@ -426,7 +426,7 @@ msgs::ReadResponses ShardRsm::HandleRead(msgs::ScanVerticesRequest &&req) { uint64_t sample_counter{0}; auto vertex_iterable = acc.Vertices(view); if (!req.order_bys.empty()) { - const auto ordered = OrderByVertices(acc, dba, vertex_iterable, req.order_bys); + const auto ordered = OrderByVertices(dba, vertex_iterable, req.order_bys); // we are traversing Elements auto it = GetStartOrderedElementsIterator(ordered, start_id, View(req.storage_view)); for (; it != ordered.end(); ++it) { @@ -509,7 +509,7 @@ msgs::ReadResponses ShardRsm::HandleRead(msgs::ExpandOneRequest &&req) { if (!req.order_by.empty()) { // Can we do differently to avoid this? We need OrderByElements but currently it returns vector, so this // workaround is here to avoid more duplication later - auto local_sorted_vertices = OrderByVertices(acc, dba, vertex_accessors, req.order_by); + auto local_sorted_vertices = OrderByVertices(dba, vertex_accessors, req.order_by); vertex_accessors.clear(); std::transform(local_sorted_vertices.begin(), local_sorted_vertices.end(), std::back_inserter(vertex_accessors), [](auto &vertex) { return vertex.object_acc; });