From 5713c67d507050e951f33e1ee18e6a58e111a063 Mon Sep 17 00:00:00 2001 From: Vlasta Date: Wed, 13 Sep 2023 08:40:53 +0200 Subject: [PATCH 1/4] runtime settings --- docs/reference-guide/configuration.md | 34 +++++++++++++++++++++++- docs/reference-guide/runtime-settings.md | 8 ++++-- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/docs/reference-guide/configuration.md b/docs/reference-guide/configuration.md index 5067ffbb476..72f42d125e3 100644 --- a/docs/reference-guide/configuration.md +++ b/docs/reference-guide/configuration.md @@ -32,7 +32,7 @@ per-database configuration. | --bolt-key-file= | Key file which should be used for the Bolt server. | `[string]` | | --bolt-num-workers= | Number of workers used by the Bolt server.
By default, this will be the number of processing units available on the machine. | `[int32]` | | --bolt-port=7687 | Port on which the Bolt server should listen. | `[int32]` | -| --bolt-server-name-for-init= | Server name which the database should send to the client in the Bolt INIT message. | `[string]` | +| --bolt-server-name-for-init=Neo4j/v5.11.0 compatible graph database server - Memgraph | Server name which the database should send to the client in the Bolt INIT message. | `[string]` | | --bolt-session-inactivity-timeout=1800 | Time in seconds after which inactive Bolt sessions will be closed. | `[int32]` | :::note @@ -112,6 +112,38 @@ workers simultaneously. | MEMGRAPH_PASSWORD | User password | `[string]` | | MEMGRAPH_PASSFILE | Path to file that contains username and password for creating user. Data in file should be in format `username:password` if your username or password contains `:` just add `\` before for example `us\:ername:password` | `[string]` | +## Runtime settings + +Memgraph contains settings that can be modified during runtime using a query. All the settings +are persisted between multiple runs. + +| Setting name | Description | +| -------------- | -------------- | +| organization.name | Name of the organization using the instance of Memgraph (used for verifying the license key). | +| enterprise.license | License key for Memgraph Enterprise. | +| server.name | Bolt server name | +| query.timeout | Maximum allowed query execution time. Value of 0 means no limit. | +| log.level | Minimum log level. Allowed values: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL. | +| log.to_stderr | Log messages go to `stderr` in addition to `logfiles`. | + +All settings can be fetched by calling the following query: + +```opencypher +SHOW DATABASE SETTINGS; +``` + +To check the value of a single setting you can use a slightly different query: + +```opencypher +SHOW DATABASE SETTING 'setting.name'; +``` + +If you want to change a value for a specific setting, following query should be used: + +```opencypher +SET DATABASE SETTING 'setting.name' TO 'some-value'; +``` + ## Additional configuration inclusion You can define additional configuration files in the main configuration file or diff --git a/docs/reference-guide/runtime-settings.md b/docs/reference-guide/runtime-settings.md index d71f19afddc..4feff1a1b1d 100644 --- a/docs/reference-guide/runtime-settings.md +++ b/docs/reference-guide/runtime-settings.md @@ -12,7 +12,11 @@ All the settings are persisted between multiple runs. | Setting name | Description | | -------------- | -------------- | | organization.name | Name of the organization using the instance of Memgraph (used for verifying the license key). | -| enterprise.license | License key for Memgraph Enterprise | +| enterprise.license | License key for Memgraph Enterprise. | +| server.name | Bolt server name | +| query.timeout | Maximum allowed query execution time. Value of 0 means no limit. | +| log.level | Minimum log level. Allowed values: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL. | +| log.to_stderr | Log messages go to `stderr` in addition to `logfiles`. | ## Checking and modifying settings @@ -29,5 +33,5 @@ SHOW DATABASE SETTING 'setting.name'; If you want to change a value for a specific setting, following query should be used: ```opencypher -SET DATABASE SETTING 'setting.name' TO 'some-string-value'; +SET DATABASE SETTING 'setting.name' TO 'some-value'; ``` From ac695f9eed814d7bc67fb46031683272ec0c4993 Mon Sep 17 00:00:00 2001 From: Vlasta Date: Wed, 13 Sep 2023 09:25:22 +0200 Subject: [PATCH 2/4] added-persistency --- docs/reference-guide/configuration.md | 23 +++++++++++---------- docs/reference-guide/runtime-settings.md | 26 +++++++++++------------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/docs/reference-guide/configuration.md b/docs/reference-guide/configuration.md index 72f42d125e3..2750b413d96 100644 --- a/docs/reference-guide/configuration.md +++ b/docs/reference-guide/configuration.md @@ -114,17 +114,18 @@ workers simultaneously. ## Runtime settings -Memgraph contains settings that can be modified during runtime using a query. All the settings -are persisted between multiple runs. - -| Setting name | Description | -| -------------- | -------------- | -| organization.name | Name of the organization using the instance of Memgraph (used for verifying the license key). | -| enterprise.license | License key for Memgraph Enterprise. | -| server.name | Bolt server name | -| query.timeout | Maximum allowed query execution time. Value of 0 means no limit. | -| log.level | Minimum log level. Allowed values: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL. | -| log.to_stderr | Log messages go to `stderr` in addition to `logfiles`. | +Memgraph contains settings that can be modified during runtime using a query. +Some runtime settings are persisted between multiple runs, while others will +fallback to the value of the command-line argument. + +| Setting name | Description | Persistent between runs | +| -------------- | -------------- | ----------------------- | +| organization.name | Name of the organization using the instance of Memgraph (used for verifying the license key). | yes | +| enterprise.license | License key for Memgraph Enterprise. | yes | +| server.name | Bolt server name. | yes | +| query.timeout | Maximum allowed query execution time. Value of 0 means no limit. | yes | +| log.level | Minimum log level. Allowed values: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL. | no | +| log.to_stderr | Log messages go to `stderr` in addition to `logfiles`. | no | All settings can be fetched by calling the following query: diff --git a/docs/reference-guide/runtime-settings.md b/docs/reference-guide/runtime-settings.md index 4feff1a1b1d..04aa4bfa86a 100644 --- a/docs/reference-guide/runtime-settings.md +++ b/docs/reference-guide/runtime-settings.md @@ -4,20 +4,18 @@ title: Runtime settings sidebar_label: Runtime settings --- -Memgraph contains settings that can be modified during runtime. -All the settings are persisted between multiple runs. - -## Settings - -| Setting name | Description | -| -------------- | -------------- | -| organization.name | Name of the organization using the instance of Memgraph (used for verifying the license key). | -| enterprise.license | License key for Memgraph Enterprise. | -| server.name | Bolt server name | -| query.timeout | Maximum allowed query execution time. Value of 0 means no limit. | -| log.level | Minimum log level. Allowed values: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL. | -| log.to_stderr | Log messages go to `stderr` in addition to `logfiles`. | - +Memgraph contains settings that can be modified during runtime using a query. +Some runtime settings are persisted between multiple runs, while others will +fallback to the value of the command-line argument. + +| Setting name | Description | Persistent between runs | +| -------------- | -------------- | ----------------------- | +| organization.name | Name of the organization using the instance of Memgraph (used for verifying the license key). | yes | +| enterprise.license | License key for Memgraph Enterprise. | yes | +| server.name | Bolt server name. | yes | +| query.timeout | Maximum allowed query execution time. Value of 0 means no limit. | yes | +| log.level | Minimum log level. Allowed values: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL. | no | +| log.to_stderr | Log messages go to `stderr` in addition to `logfiles`. | no | ## Checking and modifying settings From e03af3ace5b10769f98ce5c9560491be2e997104 Mon Sep 17 00:00:00 2001 From: Vlasta Date: Wed, 13 Sep 2023 10:22:11 +0200 Subject: [PATCH 3/4] chnglog --- docs/reference-guide/configuration.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/reference-guide/configuration.md b/docs/reference-guide/configuration.md index 2750b413d96..a6a73b93079 100644 --- a/docs/reference-guide/configuration.md +++ b/docs/reference-guide/configuration.md @@ -89,6 +89,7 @@ workers simultaneously. | --allow-load-csv=true | Controls whether LOAD CSV clause is allowed in queries. | `[bool]` | | --also-log-to-stderr=false | Log messages go to stderr in addition to logfiles. | `[bool]` | | --data-directory=/var/lib/memgraph | Path to directory in which to save all permanent data. | `[string]` | +| --delta-chain-cache-threshold=128 | The minimum number of deltas worth caching when rebuilding a certain object's state. Must be a positive non-zero integer. | `[uint64]` | | --data_recovery_on_startup=true | Facilitates recovery of one or more individual databases and their contents during startup. Replaces `--storage-recover-on-startup` | `[bool]` | | --init-file | Path to the CYPHERL file which contains queries that need to be executed before the Bolt server starts, such as creating users. | `[string]` | | --init-data-file | Path to the CYPHERL file, which contains queries that need to be executed after the Bolt server starts. | `[string]` | @@ -110,7 +111,7 @@ workers simultaneously. | -------------- | -------------- | -------------- | | MEMGRAPH_USER | Username | `[string]` | | MEMGRAPH_PASSWORD | User password | `[string]` | -| MEMGRAPH_PASSFILE | Path to file that contains username and password for creating user. Data in file should be in format `username:password` if your username or password contains `:` just add `\` before for example `us\:ername:password` | `[string]` | +| MEMGRAPH_PASSFILE | Path to file that contains username and password for creating user. Data in file should be in format `username:password` if your username or password contains `:` just add `\` before for example `us\:ername:password` | `[string]` | ## Runtime settings From a9d6755cddcb67b053d2019b9ba1409a7338333f Mon Sep 17 00:00:00 2001 From: Vlasta Date: Wed, 13 Sep 2023 10:51:01 +0200 Subject: [PATCH 4/4] adding more --- docs/reference-guide/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference-guide/configuration.md b/docs/reference-guide/configuration.md index a6a73b93079..512ee0998d9 100644 --- a/docs/reference-guide/configuration.md +++ b/docs/reference-guide/configuration.md @@ -89,7 +89,7 @@ workers simultaneously. | --allow-load-csv=true | Controls whether LOAD CSV clause is allowed in queries. | `[bool]` | | --also-log-to-stderr=false | Log messages go to stderr in addition to logfiles. | `[bool]` | | --data-directory=/var/lib/memgraph | Path to directory in which to save all permanent data. | `[string]` | -| --delta-chain-cache-threshold=128 | The minimum number of deltas worth caching when rebuilding a certain object's state. Must be a positive non-zero integer. | `[uint64]` | +| --delta-chain-cache-threshold=128 | When working at snapshot isolation level, the minimum number of deltas worth caching when rebuilding a certain object's state. Useful when executing parallel transactions dependant on changes of a frequently changed graph object, to lower CPU usage. Must be a positive non-zero integer. | `[uint64]` | | --data_recovery_on_startup=true | Facilitates recovery of one or more individual databases and their contents during startup. Replaces `--storage-recover-on-startup` | `[bool]` | | --init-file | Path to the CYPHERL file which contains queries that need to be executed before the Bolt server starts, such as creating users. | `[string]` | | --init-data-file | Path to the CYPHERL file, which contains queries that need to be executed after the Bolt server starts. | `[string]` |