Remove ast-cache flag
Summary: AST caching should be well tested by now. We should consider removing `Context.is_query_cached_` member as well as the implementation and tests for `CypherMainVisitor`. Reviewers: mislav.bradac, mferencevic, buda Reviewed By: mislav.bradac Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D833
This commit is contained in:
parent
b85ce7dfce
commit
eb821aa615
@ -32,8 +32,5 @@
|
|||||||
# database recovering is disabled by default
|
# database recovering is disabled by default
|
||||||
--snapshot-recover-on-startup=false
|
--snapshot-recover-on-startup=false
|
||||||
|
|
||||||
# use ast caching
|
|
||||||
--ast-cache=true
|
|
||||||
|
|
||||||
# number of workers
|
# number of workers
|
||||||
--num-workers=1
|
--num-workers=1
|
||||||
|
@ -24,5 +24,3 @@
|
|||||||
# database recovering is disabled by default
|
# database recovering is disabled by default
|
||||||
--snapshot-recover-on-startup=false
|
--snapshot-recover-on-startup=false
|
||||||
|
|
||||||
# use ast caching
|
|
||||||
--ast-cache=true
|
|
||||||
|
@ -24,5 +24,3 @@
|
|||||||
# database recovering is disabled by default
|
# database recovering is disabled by default
|
||||||
--snapshot-recover-on-startup=false
|
--snapshot-recover-on-startup=false
|
||||||
|
|
||||||
# use ast caching
|
|
||||||
--ast-cache=true
|
|
||||||
|
@ -24,5 +24,3 @@
|
|||||||
# database recovering is disabled by default
|
# database recovering is disabled by default
|
||||||
--snapshot-recover-on-startup=false
|
--snapshot-recover-on-startup=false
|
||||||
|
|
||||||
# use ast caching
|
|
||||||
--ast-cache=true
|
|
||||||
|
@ -75,7 +75,6 @@ parameters:
|
|||||||
--snapshot-recover-on-startup | bool | false | Recover the database on startup using the last<br/>stored snapshot.
|
--snapshot-recover-on-startup | bool | false | Recover the database on startup using the last<br/>stored snapshot.
|
||||||
--query-execution-time-sec | integer | 180 | Maximum allowed query execution time. <br/>Queries exceeding this limit will be aborted. Value of -1 means no limit.
|
--query-execution-time-sec | integer | 180 | Maximum allowed query execution time. <br/>Queries exceeding this limit will be aborted. Value of -1 means no limit.
|
||||||
--memory-warning-threshold | integer | 1024 | Memory warning threshold, in MB. If Memgraph detects there is less available RAM available it will log a warning. Set to 0 to disable.
|
--memory-warning-threshold | integer | 1024 | Memory warning threshold, in MB. If Memgraph detects there is less available RAM available it will log a warning. Set to 0 to disable.
|
||||||
--ast-cache | bool | true | Use AST caching.
|
|
||||||
--query-plan-cache | bool Cache generated query plans.
|
--query-plan-cache | bool Cache generated query plans.
|
||||||
--query-plan-cache-ttl | int | 60 | Time to live for cached query plans, in seconds.
|
--query-plan-cache-ttl | int | 60 | Time to live for cached query plans, in seconds.
|
||||||
--query-cost-planner | bool | true | Use the cost-estimating query planner.
|
--query-cost-planner | bool | true | Use the cost-estimating query planner.
|
||||||
|
@ -5,10 +5,6 @@
|
|||||||
#include "query/plan/vertex_count_cache.hpp"
|
#include "query/plan/vertex_count_cache.hpp"
|
||||||
#include "utils/flag_validation.hpp"
|
#include "utils/flag_validation.hpp"
|
||||||
|
|
||||||
// TODO: Remove this flag. Ast caching can be disabled by setting this flag to
|
|
||||||
// false, this is useful for recerating antlr crashes in highly concurrent test.
|
|
||||||
// Once antlr bugs are fixed, or real test is written this flag can be removed.
|
|
||||||
DEFINE_bool(ast_cache, true, "Use ast caching.");
|
|
||||||
DEFINE_bool(query_cost_planner, true,
|
DEFINE_bool(query_cost_planner, true,
|
||||||
"Use the cost-estimating query planner.");
|
"Use the cost-estimating query planner.");
|
||||||
DEFINE_bool(query_plan_cache, true, "Cache generated query plans");
|
DEFINE_bool(query_plan_cache, true, "Cache generated query plans");
|
||||||
|
@ -18,8 +18,6 @@
|
|||||||
#include "threading/sync/spinlock.hpp"
|
#include "threading/sync/spinlock.hpp"
|
||||||
#include "utils/timer.hpp"
|
#include "utils/timer.hpp"
|
||||||
|
|
||||||
// TODO: Remove ast_cache flag and add flag that limits cache size.
|
|
||||||
DECLARE_bool(ast_cache);
|
|
||||||
DECLARE_bool(query_cost_planner);
|
DECLARE_bool(query_cost_planner);
|
||||||
DECLARE_bool(query_plan_cache);
|
DECLARE_bool(query_plan_cache);
|
||||||
DECLARE_int32(query_plan_cache_ttl);
|
DECLARE_int32(query_plan_cache_ttl);
|
||||||
@ -62,15 +60,9 @@ class Interpreter {
|
|||||||
void Interpret(const std::string &query, GraphDbAccessor &db_accessor,
|
void Interpret(const std::string &query, GraphDbAccessor &db_accessor,
|
||||||
Stream &stream,
|
Stream &stream,
|
||||||
const std::map<std::string, TypedValue> ¶ms) {
|
const std::map<std::string, TypedValue> ¶ms) {
|
||||||
if (!FLAGS_ast_cache && !params.empty()) {
|
|
||||||
// This is totally fine, since we don't really expect anyone to turn off
|
|
||||||
// the cache.
|
|
||||||
throw utils::NotYetImplemented(
|
|
||||||
"Params not implemented if ast cache is turned off");
|
|
||||||
}
|
|
||||||
utils::Timer frontend_timer;
|
utils::Timer frontend_timer;
|
||||||
Context ctx(db_accessor);
|
Context ctx(db_accessor);
|
||||||
ctx.is_query_cached_ = FLAGS_ast_cache;
|
ctx.is_query_cached_ = true;
|
||||||
std::map<std::string, TypedValue> summary;
|
std::map<std::string, TypedValue> summary;
|
||||||
|
|
||||||
// query -> stripped query
|
// query -> stripped query
|
||||||
|
@ -23,8 +23,5 @@
|
|||||||
|
|
||||||
--snapshot-recover-on-startup=true
|
--snapshot-recover-on-startup=true
|
||||||
|
|
||||||
# use ast caching
|
|
||||||
--ast-cache=true
|
|
||||||
|
|
||||||
# number of workers
|
# number of workers
|
||||||
--num-workers=8
|
--num-workers=8
|
||||||
|
Loading…
Reference in New Issue
Block a user