From ba42578ff60448c0c6e310695083837c4f75c1d0 Mon Sep 17 00:00:00 2001 From: imilinovic Date: Tue, 16 Jul 2024 08:39:03 +0200 Subject: [PATCH 1/2] QM improvements docs --- pages/custom-query-modules/manage-query-modules.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/custom-query-modules/manage-query-modules.mdx b/pages/custom-query-modules/manage-query-modules.mdx index 942b4d078..c1758924f 100644 --- a/pages/custom-query-modules/manage-query-modules.mdx +++ b/pages/custom-query-modules/manage-query-modules.mdx @@ -53,7 +53,7 @@ If you want to reload all existing modules and load any newly added ones, use CALL mg.load_all(); ``` -If there is no response (no error message), the load was successful. +If there is no response (no error message), the load was successful. If you try to reload a module while another thread is using it the reloading will fail with an error message. You can check if the query module has been loaded by using the `mg.procedures()` procedure within a query: @@ -111,7 +111,7 @@ Example of a result: ### `mg.load_all` -Loads or reloads all modules. +Loads or reloads all modules. If any of the modules that would be reloaded are being used by another thread while this is run then an error will be thrown. Example of a Cypher query: @@ -124,7 +124,7 @@ update was successful. ### `mg.load` -Loads or reloads the given module. +Loads or reloads the given module. If the module that would be reloaded is being used by another thread while this is run then an error will be thrown. Example of a Cypher query: From ed8f74c245c4a33827f6e316b5b633b439cd21c5 Mon Sep 17 00:00:00 2001 From: imilinovic Date: Thu, 18 Jul 2024 14:53:10 +0200 Subject: [PATCH 2/2] Expand on reloading query modules docs --- pages/custom-query-modules/manage-query-modules.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/custom-query-modules/manage-query-modules.mdx b/pages/custom-query-modules/manage-query-modules.mdx index c1758924f..73aac2c6b 100644 --- a/pages/custom-query-modules/manage-query-modules.mdx +++ b/pages/custom-query-modules/manage-query-modules.mdx @@ -53,7 +53,7 @@ If you want to reload all existing modules and load any newly added ones, use CALL mg.load_all(); ``` -If there is no response (no error message), the load was successful. If you try to reload a module while another thread is using it the reloading will fail with an error message. +If there is no response (no error message), the load was successful. You can check if the query module has been loaded by using the `mg.procedures()` procedure within a query: @@ -111,7 +111,7 @@ Example of a result: ### `mg.load_all` -Loads or reloads all modules. If any of the modules that would be reloaded are being used by another thread while this is run then an error will be thrown. +Loads or reloads all modules. Modules can only be reloaded when they are not in use. If any of the modules that would be reloaded are being used by another thread while this is run then this will fail with the error: `Unable to unload modules, they are currently being used`. To resolve this either rerun the procedure when the modules aren't in use or use `mg.load` to load/reload the currently unused modules. Example of a Cypher query: @@ -124,7 +124,7 @@ update was successful. ### `mg.load` -Loads or reloads the given module. If the module that would be reloaded is being used by another thread while this is run then an error will be thrown. +Loads or reloads the given module. A module can only be reloaded if it is not in use. If the module that would be reloaded is being used by another thread while this is run then this will fail the error: `Unable to unload module 'module_name', it is currently being used`. To resolve this rerun the procedure when the module isn't in use. Example of a Cypher query: