Merge pull request #628 from memgraph/T1138-MG-fix-edge-id-allocator
Fix passing of edge IdAllocator not by value but as pointer
This commit is contained in:
commit
4d96bf5006
@ -98,7 +98,7 @@ struct ExecutionContext {
|
||||
ExecutionStats execution_stats;
|
||||
utils::AsyncTimer timer;
|
||||
msgs::ShardRequestManagerInterface *shard_request_manager{nullptr};
|
||||
IdAllocator edge_ids_alloc;
|
||||
IdAllocator *edge_ids_alloc;
|
||||
};
|
||||
|
||||
static_assert(std::is_move_assignable_v<ExecutionContext>, "ExecutionContext must be move assignable!");
|
||||
|
@ -697,7 +697,7 @@ PullPlan::PullPlan(const std::shared_ptr<CachedPlan> plan, const Parameters &par
|
||||
ctx_.is_shutting_down = &interpreter_context->is_shutting_down;
|
||||
ctx_.is_profile_query = is_profile_query;
|
||||
ctx_.shard_request_manager = shard_request_manager;
|
||||
ctx_.edge_ids_alloc = interpreter_context->edge_ids_alloc;
|
||||
ctx_.edge_ids_alloc = &interpreter_context->edge_ids_alloc;
|
||||
}
|
||||
|
||||
std::optional<plan::ProfilingStatsWithTotalTime> PullPlan::Pull(AnyStream *stream, std::optional<int> n,
|
||||
|
@ -2422,7 +2422,7 @@ class DistributedCreateExpandCursor : public Cursor {
|
||||
std::vector<msgs::NewExpand> ExpandCreationInfoToRequest(ExecutionContext &context, Frame &frame) const {
|
||||
std::vector<msgs::NewExpand> edge_requests;
|
||||
for (const auto &edge_info : std::vector{self_.edge_info_}) {
|
||||
msgs::NewExpand request{.id = {context.edge_ids_alloc.AllocateId()}};
|
||||
msgs::NewExpand request{.id = {context.edge_ids_alloc->AllocateId()}};
|
||||
ExpressionEvaluator evaluator(&frame, context.symbol_table, context.evaluation_context, nullptr,
|
||||
storage::v3::View::NEW);
|
||||
request.type = {edge_info.edge_type};
|
||||
|
Loading…
Reference in New Issue
Block a user