Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into OctEscChar
Browse files Browse the repository at this point in the history
  • Loading branch information
czpmango committed May 27, 2021
2 parents b6c98c4 + ff263a2 commit 9ed800a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/executor/Executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ Status Executor::open() {
auto status = MemInfo::make();
NG_RETURN_IF_ERROR(status);
auto mem = std::move(status).value();
if (mem->hitsHighWatermark(FLAGS_system_memory_high_watermark_ratio)) {
if (node_->isQueryNode() && mem->hitsHighWatermark(FLAGS_system_memory_high_watermark_ratio)) {
return Status::Error(
"Used memory(%ldKB) hits the high watermark(%lf) of total system memory(%ldKB).",
mem->usedInKB(),
Expand Down
49 changes: 34 additions & 15 deletions src/planner/plan/PlanNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ class PlanNode {
public:
enum class Kind : uint8_t {
kUnknown = 0,
kStart,

// Query
kGetNeighbors,
kGetVertices,
kGetEdges,
Expand All @@ -39,12 +40,25 @@ class PlanNode {
kTopN,
kLimit,
kAggregate,
kSelect,
kLoop,
kSwitchSpace,
kDedup,
kPassThrough,
kAssign,
kBFSShortest,
kProduceSemiShortestPath,
kConjunctPath,
kProduceAllPaths,
kCartesianProduct,
kSubgraph,
kDataCollect,
kLeftJoin,
kInnerJoin,

// Logic
kStart,
kSelect,
kLoop,
kPassThrough,

// schema related
kCreateSpace,
kCreateTag,
Expand All @@ -63,6 +77,7 @@ class PlanNode {
kDropSpace,
kDropTag,
kDropEdge,

// index related
kCreateTagIndex,
kCreateEdgeIndex,
Expand All @@ -87,7 +102,7 @@ class PlanNode {
kShowBalance,
kSubmitJob,
kShowHosts,
kDataCollect,

// user related
kCreateUser,
kDropUser,
Expand All @@ -98,31 +113,30 @@ class PlanNode {
kListUserRoles,
kListUsers,
kListRoles,

// Snapshot
kCreateSnapshot,
kDropSnapshot,
kShowSnapshots,
kLeftJoin,
kInnerJoin,

// Update/Delete
kDeleteVertices,
kDeleteEdges,
kUpdateVertex,
kUpdateEdge,

// Show
kShowParts,
kShowCharset,
kShowCollation,
kShowStats,
kShowConfigs,
kShowGroups,
kShowZones,
kSetConfig,
kGetConfig,
kBFSShortest,
kProduceSemiShortestPath,
kConjunctPath,
kProduceAllPaths,
kCartesianProduct,
kSubgraph,

// zone related
kShowGroups,
kShowZones,
kAddGroup,
kDropGroup,
kDescribeGroup,
Expand All @@ -133,10 +147,12 @@ class PlanNode {
kDescribeZone,
kAddHostIntoZone,
kDropHostFromZone,

// listener related
kAddListener,
kRemoveListener,
kShowListener,

// text service related
kShowTSClients,
kShowFTIndexes,
Expand All @@ -146,6 +162,9 @@ class PlanNode {
kIngest,
};

bool isQueryNode() const {
return kind_ < Kind::kStart;
}

// Describe plan node
virtual std::unique_ptr<PlanNodeDescription> explain() const;
Expand Down

0 comments on commit 9ed800a

Please sign in to comment.