Add message to HintedAbortError
Reviewers: mferencevic Reviewed By: mferencevic Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D868
This commit is contained in:
parent
4c25123d83
commit
c3a211fd4e
@ -43,7 +43,8 @@ GraphDb::GraphDb(const std::string &name, const fs::path &snapshot_db_dir)
|
|||||||
|
|
||||||
if (FLAGS_query_execution_time_sec != -1) {
|
if (FLAGS_query_execution_time_sec != -1) {
|
||||||
transaction_killer_.Run(
|
transaction_killer_.Run(
|
||||||
std::chrono::seconds(std::max(1, FLAGS_query_execution_time_sec / 4)),
|
std::chrono::seconds(
|
||||||
|
std::max(1, std::min(5, FLAGS_query_execution_time_sec / 4))),
|
||||||
[this]() {
|
[this]() {
|
||||||
tx_engine_.ForEachActiveTransaction([](tx::Transaction &t) {
|
tx_engine_.ForEachActiveTransaction([](tx::Transaction &t) {
|
||||||
if (t.creation_time() +
|
if (t.creation_time() +
|
||||||
|
@ -63,13 +63,16 @@ class TypeMismatchError : public SemanticException {
|
|||||||
class HintedAbortError : public QueryException {
|
class HintedAbortError : public QueryException {
|
||||||
public:
|
public:
|
||||||
using QueryException::QueryException;
|
using QueryException::QueryException;
|
||||||
HintedAbortError() : QueryException("") {}
|
HintedAbortError()
|
||||||
|
: QueryException(
|
||||||
|
"Transaction was asked to abort, most likely because it was "
|
||||||
|
"executing longer than time specified by "
|
||||||
|
"--query-execution-time-sec flag") {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class UnprovidedParameterError : public QueryException {
|
class UnprovidedParameterError : public QueryException {
|
||||||
public:
|
public:
|
||||||
using QueryException::QueryException;
|
using QueryException::QueryException;
|
||||||
UnprovidedParameterError() : QueryException("") {}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user