From a58e269176ea8e918ad00e2a9ed5595e6960db7f Mon Sep 17 00:00:00 2001 From: Mislav Bradac Date: Tue, 4 Apr 2017 17:27:57 +0200 Subject: [PATCH] Fix bugs needed to run qa tests Reviewers: buda Reviewed By: buda Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D216 --- config/hardcoded_queries_memgraph.yaml | 28 +++++++ src/communication/bolt/v1/states/executor.hpp | 5 +- tests/integration/hardcoded_query/clique.hpp | 81 +++++++++---------- .../create_full_profile_conceals_return.cpp | 6 +- .../create_full_profile_return.cpp | 6 +- .../create_full_profile_reveals_return.cpp | 6 +- .../hardcoded_query/create_garment.cpp | 6 +- .../create_garment_conceals.cpp | 6 +- .../create_garment_reveals.cpp | 6 +- .../hardcoded_query/delete_all.cpp | 6 +- .../hardcoded_query/match_garment.cpp | 6 +- .../match_garment_default_outfit.cpp | 6 +- ...match_garment_set_label_general_return.hpp | 11 ++- .../hardcoded_query/match_profile.cpp | 6 +- .../match_profile_garment_score.cpp | 6 +- .../match_profile_garment_set_score.cpp | 6 +- .../match_profile_garment_update_score.cpp | 6 +- tests/integration/hardcoded_query/template | 1 - 18 files changed, 115 insertions(+), 89 deletions(-) create mode 100644 config/hardcoded_queries_memgraph.yaml diff --git a/config/hardcoded_queries_memgraph.yaml b/config/hardcoded_queries_memgraph.yaml new file mode 100644 index 000000000..2aa5b86d8 --- /dev/null +++ b/config/hardcoded_queries_memgraph.yaml @@ -0,0 +1,28 @@ +########################### +# MEMGRAPH DEFAULT CONFIG # +########################### + +# NOTE: all paths are relative to the run folder +# (where the executable is runned) + +# path to the codes which will be compiled +compile_path: "./compiled/" + +# path to the template (cpp) for codes generation +template_cpp_path: "./template/plan_template_cpp" + +# path to the folder with snapshots +snapshots_path: "snapshots" + +# cleaning cycle interval +# if set to -1 the GC will not run +cleaning_cycle_sec: "30" + +# snapshot cycle interval +snapshot_cycle_sec: "60" + +# max number of snapshots which will be kept on the disk at some point +max_retained_snapshots: "3" + +# by default query engine runs in interpret mode +interpret: false diff --git a/src/communication/bolt/v1/states/executor.hpp b/src/communication/bolt/v1/states/executor.hpp index b315b0d68..204cf071f 100644 --- a/src/communication/bolt/v1/states/executor.hpp +++ b/src/communication/bolt/v1/states/executor.hpp @@ -54,7 +54,7 @@ State StateExecutorRun(Session &session) { } return EXECUTOR; - // !! QUERY ENGINE -> RUN METHOD -> EXCEPTION HANDLING !! + // !! QUERY ENGINE -> RUN METHOD -> EXCEPTION HANDLING !! } catch (const query::SyntaxException &e) { db_accessor->abort(); session.encoder_.MessageFailure( @@ -79,7 +79,7 @@ State StateExecutorRun(Session &session) { } // TODO (mferencevic): finish the error handling, cover all exceptions // which can be raised from query engine - // * [abort, MessageFailure, return ERROR] should be extracted into + // * [abort, MessageFailure, return ERROR] should be extracted into // separate function (or something equivalent) // // !! QUERY ENGINE -> RUN METHOD -> EXCEPTION HANDLING !! @@ -96,6 +96,7 @@ State StateExecutorRun(Session &session) { } else if (message_type == MessageCode::Reset) { // TODO: rollback current transaction // discard all records waiting to be sent + session.encoder_.MessageSuccess(); return EXECUTOR; } else { logger.error("Unrecognized message recieved"); diff --git a/tests/integration/hardcoded_query/clique.hpp b/tests/integration/hardcoded_query/clique.hpp index 03fcd64e8..09daef55c 100644 --- a/tests/integration/hardcoded_query/clique.hpp +++ b/tests/integration/hardcoded_query/clique.hpp @@ -5,12 +5,12 @@ #include "data_structures/bitset/static_bitset.hpp" #include "query/backend/cpp/typed_value.hpp" +#include "query/parameters.hpp" #include "query/plan_interface.hpp" #include "storage/edge_accessor.hpp" #include "storage/vertex_accessor.hpp" #include "using.hpp" #include "utils/assert.hpp" -#include "query/parameters.hpp" using std::cout; using std::endl; @@ -30,7 +30,9 @@ enum CliqueQuery { SCORE_AND_LIMIT, FIND_ALL }; bool run_general_query(GraphDbAccessor &db_accessor, const Parameters &args, Stream &stream, enum CliqueQuery query_type) { - std::vector headers{std::string("a.garment_id"), std::string("b.garment_id"), std::string("c.garment_id"), std::string("d.garment_id")}; + std::vector headers{ + std::string("a.garment_id"), std::string("b.garment_id"), + std::string("c.garment_id"), std::string("d.garment_id")}; if (query_type != CliqueQuery::FIND_ALL) headers.push_back(std::string("score")); stream.Header(headers); @@ -69,8 +71,8 @@ bool run_general_query(GraphDbAccessor &db_accessor, const Parameters &args, edges_indexed.push_back(&edges[i]); } const int n = vertices_indexed.size(); - auto cmp_vertex = [](const VertexAccessor *a, const VertexAccessor *b) - -> bool { return *a < *b; }; + auto cmp_vertex = [](const VertexAccessor *a, + const VertexAccessor *b) -> bool { return *a < *b; }; auto cmp_edge = [](const EdgeAccessor *a, const EdgeAccessor *b) -> bool { if (a->from() != b->from()) return a->from() < b->from(); return a->to() < b->to(); @@ -80,15 +82,15 @@ bool run_general_query(GraphDbAccessor &db_accessor, const Parameters &args, * @param v VertexAccessor to a vertex. * @return position of vertex or -1 if it doesn't exist. */ - auto query = - [&vertices_indexed, &cmp_vertex](const VertexAccessor &v) -> int { - int pos = lower_bound(vertices_indexed.begin(), vertices_indexed.end(), - &v, cmp_vertex) - - vertices_indexed.begin(); - if (pos == (int)vertices_indexed.size() || *vertices_indexed[pos] != v) - return -1; - return pos; - }; + auto query = [&vertices_indexed, + &cmp_vertex](const VertexAccessor &v) -> int { + int pos = lower_bound(vertices_indexed.begin(), vertices_indexed.end(), &v, + cmp_vertex) - + vertices_indexed.begin(); + if (pos == (int)vertices_indexed.size() || *vertices_indexed[pos] != v) + return -1; + return pos; + }; /** * Update bitset of neighbours. Set bit to 1 for index of every vertex * endpoint of edges with type default_outfit. @@ -145,16 +147,15 @@ bool run_general_query(GraphDbAccessor &db_accessor, const Parameters &args, * @return EdgeAccessor* if it exists, nullptr otherwise. */ auto get_edge = [&edges_indexed]( - const VertexAccessor &first, - const VertexAccessor &second) -> EdgeAccessor *{ - auto cmp_edge_to_pair = - [](const EdgeAccessor *edge, - const pair &e) - -> bool { - if (edge->from() != *e.first) return edge->from() < *e.first; - if (edge->to() != *e.second) return edge->to() < *e.second; - return false; - }; + const VertexAccessor &first, + const VertexAccessor &second) -> EdgeAccessor * { + auto cmp_edge_to_pair = []( + const EdgeAccessor *edge, + const pair &e) -> bool { + if (edge->from() != *e.first) return edge->from() < *e.first; + if (edge->to() != *e.second) return edge->to() < *e.second; + return false; + }; auto pos = lower_bound(edges_indexed.begin(), edges_indexed.end(), std::make_pair(&first, &second), cmp_edge_to_pair) - edges_indexed.begin(); @@ -178,20 +179,18 @@ bool run_general_query(GraphDbAccessor &db_accessor, const Parameters &args, * @param V index of clique vertices in vertices_indexed. * @return score if profile_index exists, else 0. */ - auto calc_score = - [&db_accessor, &vertices, &profile_index, &vertices_indexed, &get_edge]( - const std::vector &V) -> int { - int res = 0; - if (profile_index == -1) return 0; - for (auto x : V) { - auto edge = get_edge(vertices[profile_index], *vertices_indexed[x]); - if (edge == nullptr) continue; - auto prop = TypedValue(edge->PropsAt(db_accessor.property("score"))); - if (prop.type() == TypedValue::Type::Int) - res += prop.Value(); - } - return res; - }; + auto calc_score = [&db_accessor, &vertices, &profile_index, &vertices_indexed, + &get_edge](const std::vector &V) -> int { + int res = 0; + if (profile_index == -1) return 0; + for (auto x : V) { + auto edge = get_edge(vertices[profile_index], *vertices_indexed[x]); + if (edge == nullptr) continue; + auto prop = TypedValue(edge->PropsAt(db_accessor.property("score"))); + if (prop.type() == TypedValue::Type::Int) res += prop.Value(); + } + return res; + }; if (query_type == CliqueQuery::SCORE_AND_LIMIT) { auto cmp_results = [&calc_score](const std::vector &first, const std::vector &second) { @@ -207,15 +206,15 @@ bool run_general_query(GraphDbAccessor &db_accessor, const Parameters &args, std::vector result; for (auto x : results[i]) { result.push_back(vertices_indexed[x] - ->PropsAt(db_accessor.property("garment_id")) - .Value()); + ->PropsAt(db_accessor.property("garment_id")) + .Value()); } if (query_type == CliqueQuery::SCORE_AND_LIMIT) result.push_back(calc_score(results[i])); stream.Result(result); } - std::map meta{std::make_pair(std::string("type"), TypedValue(std::string("r")))}; + std::map meta{ + std::make_pair(std::string("type"), TypedValue(std::string("r")))}; stream.Summary(meta); - db_accessor.commit(); return true; } diff --git a/tests/integration/hardcoded_query/create_full_profile_conceals_return.cpp b/tests/integration/hardcoded_query/create_full_profile_conceals_return.cpp index 9ed793add..5af4e90fa 100644 --- a/tests/integration/hardcoded_query/create_full_profile_conceals_return.cpp +++ b/tests/integration/hardcoded_query/create_full_profile_conceals_return.cpp @@ -1,11 +1,11 @@ #include #include +#include "query/parameters.hpp" #include "query/plan_interface.hpp" #include "storage/edge_accessor.hpp" #include "storage/vertex_accessor.hpp" #include "using.hpp" -#include "query/parameters.hpp" using std::cout; using std::endl; @@ -26,9 +26,9 @@ class CPUPlan : public PlanInterface { stream.Header(headers); std::vector result{TypedValue(v)}; stream.Result(result); - std::map meta{std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; + std::map meta{ + std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; stream.Summary(meta); - db_accessor.commit(); return true; } diff --git a/tests/integration/hardcoded_query/create_full_profile_return.cpp b/tests/integration/hardcoded_query/create_full_profile_return.cpp index 51fddc4cd..7be08f5d7 100644 --- a/tests/integration/hardcoded_query/create_full_profile_return.cpp +++ b/tests/integration/hardcoded_query/create_full_profile_return.cpp @@ -1,11 +1,11 @@ #include #include +#include "query/parameters.hpp" #include "query/plan_interface.hpp" #include "storage/edge_accessor.hpp" #include "storage/vertex_accessor.hpp" #include "using.hpp" -#include "query/parameters.hpp" using std::cout; using std::endl; @@ -24,9 +24,9 @@ class CPUPlan : public PlanInterface { stream.Header(headers); std::vector result{TypedValue(v)}; stream.Result(result); - std::map meta{std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; + std::map meta{ + std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; stream.Summary(meta); - db_accessor.commit(); return true; } diff --git a/tests/integration/hardcoded_query/create_full_profile_reveals_return.cpp b/tests/integration/hardcoded_query/create_full_profile_reveals_return.cpp index b35ae6f69..be5056149 100644 --- a/tests/integration/hardcoded_query/create_full_profile_reveals_return.cpp +++ b/tests/integration/hardcoded_query/create_full_profile_reveals_return.cpp @@ -1,11 +1,11 @@ #include #include +#include "query/parameters.hpp" #include "query/plan_interface.hpp" #include "storage/edge_accessor.hpp" #include "storage/vertex_accessor.hpp" #include "using.hpp" -#include "query/parameters.hpp" using std::cout; using std::endl; @@ -26,9 +26,9 @@ class CPUPlan : public PlanInterface { stream.Header(headers); std::vector result{TypedValue(v)}; stream.Result(result); - std::map meta{std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; + std::map meta{ + std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; stream.Summary(meta); - db_accessor.commit(); return true; } diff --git a/tests/integration/hardcoded_query/create_garment.cpp b/tests/integration/hardcoded_query/create_garment.cpp index ba5f16fe0..bb3f676ca 100644 --- a/tests/integration/hardcoded_query/create_garment.cpp +++ b/tests/integration/hardcoded_query/create_garment.cpp @@ -1,11 +1,11 @@ #include #include +#include "query/parameters.hpp" #include "query/plan_interface.hpp" #include "storage/edge_accessor.hpp" #include "storage/vertex_accessor.hpp" #include "using.hpp" -#include "query/parameters.hpp" using std::cout; using std::endl; @@ -24,9 +24,9 @@ class CPUPlan : public PlanInterface { stream.Header(headers); std::vector result{TypedValue(v)}; stream.Result(result); - std::map meta{std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; + std::map meta{ + std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; stream.Summary(meta); - db_accessor.commit(); return true; } diff --git a/tests/integration/hardcoded_query/create_garment_conceals.cpp b/tests/integration/hardcoded_query/create_garment_conceals.cpp index 0139c6fd9..ce15dc798 100644 --- a/tests/integration/hardcoded_query/create_garment_conceals.cpp +++ b/tests/integration/hardcoded_query/create_garment_conceals.cpp @@ -1,11 +1,11 @@ #include #include +#include "query/parameters.hpp" #include "query/plan_interface.hpp" #include "storage/edge_accessor.hpp" #include "storage/vertex_accessor.hpp" #include "using.hpp" -#include "query/parameters.hpp" using std::cout; using std::endl; @@ -26,9 +26,9 @@ class CPUPlan : public PlanInterface { stream.Header(headers); std::vector result{TypedValue(v)}; stream.Result(result); - std::map meta{std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; + std::map meta{ + std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; stream.Summary(meta); - db_accessor.commit(); return true; } diff --git a/tests/integration/hardcoded_query/create_garment_reveals.cpp b/tests/integration/hardcoded_query/create_garment_reveals.cpp index ad2b388dd..bda85f9d0 100644 --- a/tests/integration/hardcoded_query/create_garment_reveals.cpp +++ b/tests/integration/hardcoded_query/create_garment_reveals.cpp @@ -1,11 +1,11 @@ #include #include +#include "query/parameters.hpp" #include "query/plan_interface.hpp" #include "storage/edge_accessor.hpp" #include "storage/vertex_accessor.hpp" #include "using.hpp" -#include "query/parameters.hpp" using std::cout; using std::endl; @@ -26,9 +26,9 @@ class CPUPlan : public PlanInterface { stream.Header(headers); std::vector result{TypedValue(v)}; stream.Result(result); - std::map meta{std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; + std::map meta{ + std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; stream.Summary(meta); - db_accessor.commit(); return true; } diff --git a/tests/integration/hardcoded_query/delete_all.cpp b/tests/integration/hardcoded_query/delete_all.cpp index 971d3f6d5..7350e9aa1 100644 --- a/tests/integration/hardcoded_query/delete_all.cpp +++ b/tests/integration/hardcoded_query/delete_all.cpp @@ -2,10 +2,10 @@ #include #include "query/backend/cpp/typed_value.hpp" +#include "query/parameters.hpp" #include "query/plan_interface.hpp" #include "query/stripped.hpp" #include "using.hpp" -#include "query/parameters.hpp" using std::cout; using std::endl; @@ -19,9 +19,9 @@ class CPUPlan : public PlanInterface { for (auto v : db_accessor.vertices()) db_accessor.detach_remove_vertex(v); std::vector headers; stream.Header(headers); - std::map meta{std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; + std::map meta{ + std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; stream.Summary(meta); - db_accessor.commit(); return true; } diff --git a/tests/integration/hardcoded_query/match_garment.cpp b/tests/integration/hardcoded_query/match_garment.cpp index 0a41578a2..de7a022fc 100644 --- a/tests/integration/hardcoded_query/match_garment.cpp +++ b/tests/integration/hardcoded_query/match_garment.cpp @@ -2,11 +2,11 @@ #include #include "query/backend/cpp/typed_value.hpp" +#include "query/parameters.hpp" #include "query/plan_interface.hpp" #include "storage/edge_accessor.hpp" #include "storage/vertex_accessor.hpp" #include "using.hpp" -#include "query/parameters.hpp" using std::cout; using std::endl; @@ -30,9 +30,9 @@ class CPUPlan : public PlanInterface { stream.Result(result); } } - std::map meta{std::make_pair(std::string("type"), TypedValue(std::string("r")))}; + std::map meta{ + std::make_pair(std::string("type"), TypedValue(std::string("r")))}; stream.Summary(meta); - db_accessor.commit(); return true; } ~CPUPlan() {} diff --git a/tests/integration/hardcoded_query/match_garment_default_outfit.cpp b/tests/integration/hardcoded_query/match_garment_default_outfit.cpp index 94cb854e9..215c84e1e 100644 --- a/tests/integration/hardcoded_query/match_garment_default_outfit.cpp +++ b/tests/integration/hardcoded_query/match_garment_default_outfit.cpp @@ -2,11 +2,11 @@ #include #include "query/backend/cpp/typed_value.hpp" +#include "query/parameters.hpp" #include "query/plan_interface.hpp" #include "storage/edge_accessor.hpp" #include "storage/vertex_accessor.hpp" #include "using.hpp" -#include "query/parameters.hpp" using std::cout; using std::endl; @@ -48,9 +48,9 @@ class CPUPlan : public PlanInterface { std::vector result{TypedValue(e)}; stream.Result(result); } - std::map meta{std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; + std::map meta{ + std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; stream.Summary(meta); - db_accessor.commit(); return true; } diff --git a/tests/integration/hardcoded_query/match_garment_set_label_general_return.hpp b/tests/integration/hardcoded_query/match_garment_set_label_general_return.hpp index e6283c41f..f14c6e2a1 100644 --- a/tests/integration/hardcoded_query/match_garment_set_label_general_return.hpp +++ b/tests/integration/hardcoded_query/match_garment_set_label_general_return.hpp @@ -2,8 +2,8 @@ #include #include "query/backend/cpp/typed_value.hpp" -#include "query/plan_interface.hpp" #include "query/parameters.hpp" +#include "query/plan_interface.hpp" #include "storage/edge_accessor.hpp" #include "storage/vertex_accessor.hpp" #include "using.hpp" @@ -14,9 +14,8 @@ using std::endl; // General query type: MATCH (g:garment {garment_id: 1234}) SET g:'GENERAL' // RETURN g -bool run_general_query(GraphDbAccessor &db_accessor, - const Parameters &args, Stream &stream, - const std::string &general_label) { +bool run_general_query(GraphDbAccessor &db_accessor, const Parameters &args, + Stream &stream, const std::string &general_label) { std::vector headers{std::string("g")}; stream.Header(headers); for (auto vertex : db_accessor.vertices()) { @@ -31,8 +30,8 @@ bool run_general_query(GraphDbAccessor &db_accessor, stream.Result(result); } } - std::map meta{std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; + std::map meta{ + std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; stream.Summary(meta); - db_accessor.commit(); return true; } diff --git a/tests/integration/hardcoded_query/match_profile.cpp b/tests/integration/hardcoded_query/match_profile.cpp index c3b5e069f..642624e5f 100644 --- a/tests/integration/hardcoded_query/match_profile.cpp +++ b/tests/integration/hardcoded_query/match_profile.cpp @@ -2,11 +2,11 @@ #include #include "query/backend/cpp/typed_value.hpp" +#include "query/parameters.hpp" #include "query/plan_interface.hpp" #include "storage/edge_accessor.hpp" #include "storage/vertex_accessor.hpp" #include "using.hpp" -#include "query/parameters.hpp" using std::cout; using std::endl; @@ -36,9 +36,9 @@ class CPUPlan : public PlanInterface { stream.Result(result); } } - std::map meta{std::make_pair(std::string("type"), TypedValue(std::string("r")))}; + std::map meta{ + std::make_pair(std::string("type"), TypedValue(std::string("r")))}; stream.Summary(meta); - db_accessor.commit(); return true; } ~CPUPlan() {} diff --git a/tests/integration/hardcoded_query/match_profile_garment_score.cpp b/tests/integration/hardcoded_query/match_profile_garment_score.cpp index 2ccc0cc45..92ca5816b 100644 --- a/tests/integration/hardcoded_query/match_profile_garment_score.cpp +++ b/tests/integration/hardcoded_query/match_profile_garment_score.cpp @@ -2,12 +2,12 @@ #include #include "query/backend/cpp/typed_value.hpp" +#include "query/parameters.hpp" #include "query/plan_interface.hpp" #include "query/stripped.hpp" #include "storage/edge_accessor.hpp" #include "storage/vertex_accessor.hpp" #include "using.hpp" -#include "query/parameters.hpp" using std::cout; using std::endl; @@ -51,9 +51,9 @@ class CPUPlan : public PlanInterface { stream.Result(result); } } - std::map meta{std::make_pair(std::string("type"), TypedValue(std::string("r")))}; + std::map meta{ + std::make_pair(std::string("type"), TypedValue(std::string("r")))}; stream.Summary(meta); - db_accessor.commit(); return true; } diff --git a/tests/integration/hardcoded_query/match_profile_garment_set_score.cpp b/tests/integration/hardcoded_query/match_profile_garment_set_score.cpp index fdc15ade4..fbfe27d56 100644 --- a/tests/integration/hardcoded_query/match_profile_garment_set_score.cpp +++ b/tests/integration/hardcoded_query/match_profile_garment_set_score.cpp @@ -2,11 +2,11 @@ #include #include "query/backend/cpp/typed_value.hpp" +#include "query/parameters.hpp" #include "query/plan_interface.hpp" #include "storage/edge_accessor.hpp" #include "storage/vertex_accessor.hpp" #include "using.hpp" -#include "query/parameters.hpp" using std::cout; using std::endl; @@ -55,9 +55,9 @@ class CPUPlan : public PlanInterface { std::vector result{TypedValue(e)}; stream.Result(result); } - std::map meta{std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; + std::map meta{ + std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; stream.Summary(meta); - db_accessor.commit(); return true; } diff --git a/tests/integration/hardcoded_query/match_profile_garment_update_score.cpp b/tests/integration/hardcoded_query/match_profile_garment_update_score.cpp index 7d75973bb..cac77837f 100644 --- a/tests/integration/hardcoded_query/match_profile_garment_update_score.cpp +++ b/tests/integration/hardcoded_query/match_profile_garment_update_score.cpp @@ -2,11 +2,11 @@ #include #include "query/backend/cpp/typed_value.hpp" +#include "query/parameters.hpp" #include "query/plan_interface.hpp" #include "storage/edge_accessor.hpp" #include "storage/vertex_accessor.hpp" #include "using.hpp" -#include "query/parameters.hpp" using std::cout; using std::endl; @@ -51,9 +51,9 @@ class CPUPlan : public PlanInterface { stream.Result(result); } } - std::map meta{std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; + std::map meta{ + std::make_pair(std::string("type"), TypedValue(std::string("rw")))}; stream.Summary(meta); - db_accessor.commit(); return true; } diff --git a/tests/integration/hardcoded_query/template b/tests/integration/hardcoded_query/template index abbf15697..b9a771cba 100644 --- a/tests/integration/hardcoded_query/template +++ b/tests/integration/hardcoded_query/template @@ -14,7 +14,6 @@ class CPUPlan : public PlanInterface { public: bool run(GraphDbAccessor &db_accessor, const StrippedArguments &args, Stream &stream) { - db_accessor.commit(); return true; }