Skip to content

Commit

Permalink
Fix tck tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yixinglu committed Sep 29, 2021
1 parent e7d98a5 commit 547782f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/graph/context/Iterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,20 @@
#include "interface/gen-cpp2/common_types.h"

DECLARE_int32(num_rows_to_check_memory);
DECLARE_double(system_memory_high_watermark_ratio);

namespace nebula {
namespace graph {

bool Iterator::hitsSysMemoryHighWatermark() const {
if (checkMemory_) {
// TODO(yee): speed up this check
if (0 == numReadRows_ % FLAGS_num_rows_to_check_memory) {
return MemoryUtils::kHitMemoryHighWatermark.load();
if (UNLIKELY(0 == numReadRows_ % FLAGS_num_rows_to_check_memory)) {
if (MemoryUtils::kHitMemoryHighWatermark.load()) {
throw std::runtime_error(
folly::sformat("Used memory hits the high watermark({}) of total system memory.",
FLAGS_system_memory_high_watermark_ratio));
}
}
}
return false;
Expand Down
2 changes: 1 addition & 1 deletion tests/tck/features/match/Base.feature
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ Feature: Basic match
"""
MATCH (v:player) where v.name return v
"""
Then a ExecutionError should be raised at runtime: Internal Error: Wrong type result, the type should be NULL, EMPTY or BOOL
Then a ExecutionError should be raised at runtime: Wrong type result, the type should be NULL, EMPTY or BOOL
Scenario: Unimplemented features
When executing query:
Expand Down

0 comments on commit 547782f

Please sign in to comment.