From 763595121db1ed7ae29d8fd548edda0e5c21bd2d Mon Sep 17 00:00:00 2001 From: jimingquan Date: Tue, 4 Apr 2023 11:27:40 +0800 Subject: [PATCH] fix step is 0 --- src/graph/executor/algo/BatchShortestPath.cpp | 3 +++ src/graph/executor/algo/SingleShortestPath.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/graph/executor/algo/BatchShortestPath.cpp b/src/graph/executor/algo/BatchShortestPath.cpp index 1ec6cd6204c..42d69f03bc8 100644 --- a/src/graph/executor/algo/BatchShortestPath.cpp +++ b/src/graph/executor/algo/BatchShortestPath.cpp @@ -16,6 +16,9 @@ namespace graph { folly::Future BatchShortestPath::execute(const HashSet& startVids, const HashSet& endVids, DataSet* result) { + if (maxStep_ == 0) { + return Status::OK(); + } // MemoryTrackerVerified size_t rowSize = init(startVids, endVids); std::vector> futures; diff --git a/src/graph/executor/algo/SingleShortestPath.cpp b/src/graph/executor/algo/SingleShortestPath.cpp index ed0d0cce4b6..90e1bfc9813 100644 --- a/src/graph/executor/algo/SingleShortestPath.cpp +++ b/src/graph/executor/algo/SingleShortestPath.cpp @@ -14,6 +14,9 @@ namespace graph { folly::Future SingleShortestPath::execute(const HashSet& startVids, const HashSet& endVids, DataSet* result) { + if (maxStep_ == 0) { + return Status::OK(); + } size_t rowSize = startVids.size() * endVids.size(); init(startVids, endVids, rowSize); std::vector> futures;