FLAG 'snapshot_on_destruction' renamed to 'snapshot_on_exit'
Reviewers: teon.banek, buda Reviewed By: teon.banek, buda Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D471
This commit is contained in:
parent
a8a2a8c40d
commit
e28fc6ed41
@ -4,37 +4,37 @@
|
||||
# (where the executable is run)
|
||||
|
||||
# path to the codes which will be compiled
|
||||
--compile_path=./compiled/
|
||||
--compile-path=./compiled/
|
||||
|
||||
# path to the template (cpp) for codes generation
|
||||
--template_cpp_path=./template/plan_template_cpp
|
||||
--template-cpp-path=./template/plan_template_cpp
|
||||
|
||||
# path to the folder with snapshots
|
||||
--snapshot_directory=/var/lib/memgraph/snapshots
|
||||
--snapshot-directory=/var/lib/memgraph/snapshots
|
||||
|
||||
# cleaning cycle interval
|
||||
# if set to -1 the GC will not run
|
||||
--cleaning_cycle_sec=30
|
||||
--cleaning-cycle-sec=30
|
||||
|
||||
# snapshot cycle interval
|
||||
# if set to -1 the snapshooter will not run
|
||||
--snapshot_cycle_sec=300
|
||||
--snapshot-cycle-sec=300
|
||||
|
||||
# create snapshot disabled on db destruction
|
||||
--snapshot_db_destruction=true
|
||||
# create snapshot disabled on db exit
|
||||
--snapshot-on-db-exit=true
|
||||
|
||||
# max number of snapshots which will be kept on the disk at some point
|
||||
# if set to -1 the max number of snapshots is unlimited
|
||||
--max_retained_snapshots=3
|
||||
--max-retained-snapshots=3
|
||||
|
||||
# by default query engine runs in interpret mode
|
||||
--interpret=true
|
||||
|
||||
# database recovering is disabled by default
|
||||
--recover_on_startup=true
|
||||
--recover-on-startup=true
|
||||
|
||||
# use ast caching
|
||||
--ast_cache=false
|
||||
--ast-cache=false
|
||||
|
||||
# path to where the log should be stored
|
||||
--log_file=/var/lib/memgraph/memgraph.log
|
||||
--log-file=/var/lib/memgraph/memgraph.log
|
||||
|
@ -4,34 +4,34 @@
|
||||
# (where the executable is runned)
|
||||
|
||||
# directory to the codes which will be compiled
|
||||
--compile_directory=./compiled/
|
||||
--compile-directory=compiled
|
||||
|
||||
# path to the template (cpp) for codes generation
|
||||
--template_cpp_path=./template/plan_template_cpp
|
||||
--template-cpp-path=template/plan_template_cpp
|
||||
|
||||
# directory to the folder with snapshots
|
||||
--snapshot_directory=snapshots
|
||||
--snapshot-directory=snapshots
|
||||
|
||||
# cleaning cycle interval
|
||||
# if set to -1 the GC will not run
|
||||
--gc_cycle_sec=30
|
||||
--gc-cycle-sec=30
|
||||
|
||||
# snapshot cycle interval
|
||||
# if set to -1 the snapshooter will not run
|
||||
--snapshot_cycle_sec=-1
|
||||
--snapshot-cycle-sec=-1
|
||||
|
||||
# create snapshot disabled on db destruction
|
||||
--snapshot_on_db_destruction=false
|
||||
# create snapshot disabled on db exit
|
||||
--snapshot-on-db-exit=true
|
||||
|
||||
# max number of snapshots which will be kept on the disk at some point
|
||||
# if set to -1 the max number of snapshots is unlimited
|
||||
--max_retained_snapshots=-1
|
||||
--max-retained-snapshots=-1
|
||||
|
||||
# by default query engine runs in interpret mode
|
||||
--interpret=true
|
||||
|
||||
# database recovering is disabled by default
|
||||
--recover_on_startup=false
|
||||
--recover-on-startup=false
|
||||
|
||||
# use ast caching
|
||||
--ast_cache=false
|
||||
--ast-cache=false
|
||||
|
@ -12,6 +12,5 @@ data structures, multi-version concurrency control and asynchronous IO.
|
||||
* [Installation](installation.md)
|
||||
* [Quick Start](quick-start.md)
|
||||
* [openCypher Query Language](open-cypher.md)
|
||||
* [Interfacing with Memgraph](interfaces.md)
|
||||
* [Upcoming Features](upcoming-features.md)
|
||||
|
||||
|
@ -69,7 +69,7 @@ parameters:
|
||||
--num-workers | integer | CPU count[^1] | Number of Memgraph worker threads.
|
||||
--snapshot-cycle-sec | integer | 300 | Interval (seconds) between database snapshots.<br/>Value of -1 turns taking snapshots off.
|
||||
--max-retained-snapshots | integer | 3 | Number of retained snapshots.<br/>Value -1 means without limit.
|
||||
--snapshot-on-db-destruction | bool | false | Make a snapshot when closing Memgraph.
|
||||
--snapshot-on-db-exit | bool | false | Make a snapshot when closing Memgraph.
|
||||
--recover-on-startup | bool | false | Recover the database on startup using the last<br/>stored snapshot.
|
||||
|
||||
[^1]: Maximum number of concurrent executions on the current CPU.
|
||||
|
@ -1,22 +0,0 @@
|
||||
## Interfacing with Memgraph
|
||||
|
||||
This chapter describes ways to access the Memgraph database.
|
||||
|
||||
Currently only the [*Bolt protocol*](#bolt-protocol) is supported. We are
|
||||
working on implementing a web-browser interface.
|
||||
|
||||
### Bolt Protocol
|
||||
|
||||
The [Bolt protocol](https://boltprotocol.org/) was designed for efficient
|
||||
communication with graph databases. Memgraph supports
|
||||
[Version 1](https://boltprotocol.org/v1/) of the protocol.
|
||||
|
||||
Official Bolt protocol drivers are provided for multiple programming languages:
|
||||
|
||||
* [Java](http://neo4j.com/docs/api/java-driver)
|
||||
* [Python](http://neo4j.com/docs/api/python-driver)
|
||||
* [JavaScript](http://neo4j.com/docs/api/javascript-driver)
|
||||
* [C#](http://neo4j.com/docs/api/dotnet-driver)
|
||||
|
||||
They can be used for easier building custom interfaces for Memgraph. We
|
||||
recommend using drivers starting from version 1.3.
|
@ -18,8 +18,8 @@ DEFINE_int32(max_retained_snapshots, -1,
|
||||
DEFINE_int32(snapshot_cycle_sec, -1,
|
||||
"Amount of time between starts of two snapshooters in seconds. -1 "
|
||||
"to turn off.");
|
||||
DEFINE_bool(snapshot_on_db_destruction, false,
|
||||
"Snapshot on database destruction.");
|
||||
DEFINE_bool(snapshot_on_db_exit, false,
|
||||
"Snapshot on exiting the database.");
|
||||
|
||||
DECLARE_string(snapshot_directory);
|
||||
|
||||
@ -107,7 +107,7 @@ GraphDb::~GraphDb() {
|
||||
snapshot_creator_.Stop();
|
||||
|
||||
// Create last database snapshot
|
||||
if (FLAGS_snapshot_on_db_destruction == true) {
|
||||
if (FLAGS_snapshot_on_db_exit == true) {
|
||||
GraphDbAccessor db_accessor(*this);
|
||||
logger.info("Creating snapshot on shutdown...");
|
||||
const bool status = snapshooter_.MakeSnapshot(
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "dbms/dbms.hpp"
|
||||
#include "durability/snapshooter.hpp"
|
||||
|
||||
DECLARE_bool(snapshot_on_db_destruction);
|
||||
DECLARE_bool(snapshot_on_db_exit);
|
||||
DECLARE_int32(snapshot_cycle_sec);
|
||||
DECLARE_string(snapshot_directory);
|
||||
|
||||
@ -103,7 +103,7 @@ TEST_F(SnapshotTest, CreateSnapshotWithUnlimitedMaxRetainedSnapshots) {
|
||||
TEST_F(SnapshotTest, TestSnapshotFileOnDbDestruct) {
|
||||
{
|
||||
FLAGS_snapshot_directory = SNAPSHOTS_FOLDER_ALL_DB;
|
||||
FLAGS_snapshot_on_db_destruction = true;
|
||||
FLAGS_snapshot_on_db_exit = true;
|
||||
Dbms dbms;
|
||||
auto dba = dbms.active();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user