Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #1126 graphd crashed #1128

Merged
merged 1 commit into from
Oct 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/graph/Executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ std::unique_ptr<Executor> Executor::makeExecutor(Sentence *sentence) {
executor = std::make_unique<LimitExecutor>(sentence, ectx());
break;
case Sentence::Kind::kUnknown:
LOG(FATAL) << "Sentence kind unknown";
break;
LOG(ERROR) << "Sentence kind unknown";
return nullptr;
default:
LOG(FATAL) << "Sentence kind illegal: " << kind;
break;
LOG(ERROR) << "Sentence kind illegal: " << kind;
return nullptr;
}
return executor;
}
Expand Down
4 changes: 3 additions & 1 deletion src/graph/SequentialExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ Status SequentialExecutor::prepare() {
for (auto i = 0U; i < sentences_->sentences_.size(); i++) {
auto *sentence = sentences_->sentences_[i].get();
auto executor = makeExecutor(sentence);
DCHECK(executor != nullptr);
if (executor == nullptr) {
return Status::Error("The statement has not been implemented");
}
auto status = executor->prepare();
if (!status.ok()) {
FLOG_ERROR("Prepare executor `%s' failed: %s",
Expand Down