memgraph / mage

MAGE - Memgraph Advanced Graph Extensions :crystal_ball:
Apache License 2.0
244 stars 24 forks source link

[BUG] Hot-Swap is not working #381

Open antejavor opened 10 months ago

antejavor commented 10 months ago

Describe the bug Once Memgraph is started and you have a QM C/C++, Rust in the form of a .so file.
Loaded and ready to use in Memgraph, after the CALL mg.load_all(); and you have tested it.

Then you decide to change something in QM and compile a new one .so file, cpto the proper location, and call: CALL mg.load_all(); Everything seems to load properly:

[2023-10-10 11:12:47.933] [memgraph_log] [debug] [Run - memgraph] 'CALL mg.load_all()'
[2023-10-10 11:12:47.956] [memgraph_log] [trace] PrepareCypher has not encountered all shortest paths and will  use of monotonic memory
[2023-10-10 11:12:47.958] [memgraph_log] [info] Closing module "/usr/lib/memgraph/query_modules/wcc.py"...
[2023-10-10 11:12:48.107] [memgraph_log] [info] Closed module "/usr/lib/memgraph/query_modules/wcc.py"
[2023-10-10 11:12:48.108] [memgraph_log] [info] Closing module "/usr/lib/memgraph/query_modules/py_example.py"...
[2023-10-10 11:12:48.143] [memgraph_log] [info] Closed module "/usr/lib/memgraph/query_modules/py_example.py"
[2023-10-10 11:12:48.144] [memgraph_log] [info] Closing module "/usr/lib/memgraph/query_modules/nxalg.py"...
[2023-10-10 11:12:48.261] [memgraph_log] [info] Closed module "/usr/lib/memgraph/query_modules/nxalg.py"
[2023-10-10 11:12:48.261] [memgraph_log] [info] Closing module "/usr/lib/memgraph/query_modules/mgp_networkx.py"...
[2023-10-10 11:12:48.266] [memgraph_log] [warning] Failed to remove the module mgp_networkx from sys.modules
[2023-10-10 11:12:48.266] [memgraph_log] [info] Closing module "/usr/lib/memgraph/query_modules/lib_hello_query_module.so"...
[2023-10-10 11:12:48.277] [memgraph_log] [info] Closed module "/usr/lib/memgraph/query_modules/lib_hello_query_module.so"
[2023-10-10 11:12:48.277] [memgraph_log] [info] Closing module "/usr/lib/memgraph/query_modules/graph_analyzer.py"...
[2023-10-10 11:12:48.282] [memgraph_log] [info] Closed module "/usr/lib/memgraph/query_modules/graph_analyzer.py"
[2023-10-10 11:12:48.282] [memgraph_log] [info] Closing module "/usr/lib/memgraph/query_modules/example_c.so"...
[2023-10-10 11:12:48.283] [memgraph_log] [info] Closed module "/usr/lib/memgraph/query_modules/example_c.so"
[2023-10-10 11:12:48.283] [memgraph_log] [info] Loading module "/usr/lib/memgraph/query_modules/graph_analyzer.py"...
[2023-10-10 11:12:49.092] [memgraph_log] [info] Loaded module "/usr/lib/memgraph/query_modules/graph_analyzer.py"
[2023-10-10 11:12:49.092] [memgraph_log] [info] Loading module "/usr/lib/memgraph/query_modules/example_c.so"...
[2023-10-10 11:12:49.094] [memgraph_log] [info] Loaded module "/usr/lib/memgraph/query_modules/example_c.so"
[2023-10-10 11:12:49.094] [memgraph_log] [info] Loading module "/usr/lib/memgraph/query_modules/nxalg.py"...
[2023-10-10 11:12:49.156] [memgraph_log] [info] Loaded module "/usr/lib/memgraph/query_modules/nxalg.py"
[2023-10-10 11:12:49.156] [memgraph_log] [info] Loading module "/usr/lib/memgraph/query_modules/py_example.py"...
[2023-10-10 11:12:49.158] [memgraph_log] [info] Loaded module "/usr/lib/memgraph/query_modules/py_example.py"
[2023-10-10 11:12:49.158] [memgraph_log] [info] Loading module "/usr/lib/memgraph/query_modules/example_cpp.so"...
[2023-10-10 11:12:49.160] [memgraph_log] [error] Unable to load module "/usr/lib/memgraph/query_modules/example_cpp.so"; /usr/lib/aarch64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/memgraph/query_modules/example_cpp.so). For more details, visit https://memgr.ph/modules.
[2023-10-10 11:12:49.161] [memgraph_log] [info] Loading module "/usr/lib/memgraph/query_modules/mgp_networkx.py"...
[2023-10-10 11:12:49.161] [memgraph_log] [info] Loaded module "/usr/lib/memgraph/query_modules/mgp_networkx.py"
[2023-10-10 11:12:49.161] [memgraph_log] [info] Loading module "/usr/lib/memgraph/query_modules/wcc.py"...
[2023-10-10 11:12:49.162] [memgraph_log] [info] Loaded module "/usr/lib/memgraph/query_modules/wcc.py"
[2023-10-10 11:12:49.162] [memgraph_log] [info] Loading module "/usr/lib/memgraph/query_modules/lib_hello_query_module.so"...
[2023-10-10 11:12:49.185] [memgraph_log] [info] Loaded module "/usr/lib/memgraph/query_modules/lib_hello_query_module.so"

But the changes you have made are not included. To make it work, you need to restart the Memgraph

antejavor commented 10 months ago

Related: https://github.com/memgraph/memgraph/issues/960