Fix edge id allocator

This commit is contained in:
jbajic 2022-10-31 16:26:56 +01:00
parent 59c7d81ae8
commit 6834ce01fe
3 changed files with 3 additions and 3 deletions

View File

@ -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!");

View File

@ -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,

View File

@ -2402,7 +2402,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};