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

[master < ] Enable runtime configurable settings #1183

Merged
merged 9 commits into from Sep 11, 2023
Merged

Conversation

andrejtonev
Copy link
Contributor

@andrejtonev andrejtonev commented Aug 21, 2023

  • Add run-time configurable timeout.
  • Set the default Bolt server name and allow run-time change.
  • Add log-level
  • Add also-log-to-stderr

[master < Task] PR

  • Check, and update documentation if necessary
  • Provide the full content or a guide for the final git message

To keep docs changelog up to date, one more thing to do:

  • Write a release note here, including added/changed clauses
  • Tag someone from docs team in the comments

closes #474

@andrejtonev andrejtonev changed the title Enable runtime configurable timeout and server name [master < ] Enable runtime configurable timeout and server name Aug 21, 2023
@andrejtonev andrejtonev force-pushed the MG-runtime-settings branch 2 times, most recently from 51e8305 to d2f02a8 Compare August 23, 2023 15:02
@gitbuda gitbuda added the feature feature label Aug 23, 2023
@gitbuda gitbuda added this to the mg-v2.11.0 milestone Aug 23, 2023
@andrejtonev andrejtonev changed the title [master < ] Enable runtime configurable timeout and server name [master < ] Enable runtime configurable settings Aug 24, 2023
@andrejtonev andrejtonev marked this pull request as ready for review August 24, 2023 14:36
Copy link
Contributor

@Ignition Ignition left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the move from gflags remove them from --help?

src/flags/CMakeLists.txt Outdated Show resolved Hide resolved
src/flags/general.cpp Show resolved Hide resolved
src/flags/general.cpp Show resolved Hide resolved
src/flags/run_time_configurable.cpp Show resolved Hide resolved
tests/integration/run_time_settings/runner.py Outdated Show resolved Hide resolved
src/query/interpreter.cpp Show resolved Hide resolved
@andrejtonev
Copy link
Contributor Author

@vpavicic

Added new run-time configurable settings:

  1. Server name
  2. Query execution timeout
  3. Log level
  4. Log to stderr
  1. Bolt server name can now be changed at run-time by executing the following query
    SET DATABASE SETTING 'server.name' TO 'new-name'. The updated name persist between session. The user can override the name by updating the settings as above, or by defining the command-line argument as before.
    The default server name has also been updated to Neo4j/v5.11.0 compatible graph database server - Memgraph.

  2. To change the query execution timeout in seconds run SET DATABASE SETTING 'query.timeout' TO '1234'.
    The updated timeout takes effect on subsequent queries. The query timeout value persists between session and can be updated via the above query or command-line argument.

  3. Log level can be set at run-time by calling SET DATABASE SETTING 'log.level' TO 'TRACE'.
    Allowed values are: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL.
    The log level is not session persistent and will take on the value of the command-line argument at startup (default: WARNING).

  4. User can enable/disable logging to stderr by calling SET DATABASE SETTING 'log.to_stderr' TO 'true/false'. The value does not persist between session and will always take on the value of the command-line argument (default: false).

@gitbuda gitbuda merged commit 5e5f4ff into master Sep 11, 2023
6 checks passed
@gitbuda gitbuda deleted the MG-runtime-settings branch September 11, 2023 15:30
as51340 pushed a commit that referenced this pull request Nov 10, 2023
server name, query timeout settings, log.level, log.to_stderr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs needed Docs needed feature feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Bolt HELLO message response doesn't contains "server" (default value empty)
4 participants