diff --git a/pages/advanced-algorithms.mdx b/pages/advanced-algorithms.mdx index 315c2ea80..42374738e 100644 --- a/pages/advanced-algorithms.mdx +++ b/pages/advanced-algorithms.mdx @@ -5,7 +5,7 @@ description: Advance your graph analysis capabilities with Memgraph's tailored a import { Steps } from 'nextra/components' import {CommunityLinks} from '/components/social-card/CommunityLinks' - +import { Callout } from 'nextra/components' # Advanced algorithms @@ -47,14 +47,15 @@ programming languages and they are all runnable inside Memgraph. ### Install MAGE -If you started Memgraph with the `memgraph-platform` or `memgraph-mage` Docker +If you started Memgraph with the `memgraph-mage` Docker image, MAGE is already included and you can skip to step 3. If you are using Linux, you can [install MAGE from source](/advanced-algorithms/install-mage#linux). -The execution of graph algorithms can be accelerated with the GPU by using the -[Memgraph X NVIDIA cuGraph](/advanced-algorithms/install-mage#mage--nvidia-cugraph) version of the library. + +We currently do not produce MAGE images with cuGraph (since version 1.3). If this is something you require, please raise an [issue](https://github.com/memgraph/mage/issues) + ### Load query modules @@ -82,6 +83,33 @@ MAGE compatibility with Memgraph versions. | MAGE version | Memgraph version | |--------------|-------------------| +| 3.1 | 3.1 | +| 3.0 | 3.0 | +| 1.22 | 2.22 | +| 1.22.1 | 2.22.1 | +| 1.21 | 2.21 | +| 1.20.1 | 2.20.1 | +| 1.20 | 2.20 | +| 1.19 | 2.19 | +| 1.18.1 | 2.18.1 | +| 1.18 | 2.18 | +| 1.17 | 2.17 | +| 1.16.1 | 2.16.1 | +| 1.16 | 2.16 | +| 1.15.2 | 2.15.2 | +| 1.15.1 | 2.15.1 | +| 1.15 | 2.15 | +| 1.14.1 | 2.14.1 | +| 1.14 | 2.14 | +| 1.13 | 2.13 | +| 1.12.1 | 2.12.1 | +| 1.12 | 2.12 | +| 1.11.1 | 2.11 | +| 1.11.0 | 2.11 | +| 1.10 | 2.10.1 | +| 1.9 | 2.10.0 | +| 1.8 | 2.9 | +| 1.7 | 2.8 | | >= 1.6 | >= 2.5.2 | | >= 1.4 | >= 2.4.0 | | >= 1.0 | >= 2.0.0 | diff --git a/pages/advanced-algorithms/available-algorithms/migrate.mdx b/pages/advanced-algorithms/available-algorithms/migrate.mdx index dccec6d37..ec7f6c3ad 100644 --- a/pages/advanced-algorithms/available-algorithms/migrate.mdx +++ b/pages/advanced-algorithms/available-algorithms/migrate.mdx @@ -98,6 +98,61 @@ CREATE (u1)-[:FRIENDS_WITH]->(u2); --- +### `neo4j()` + +With the `migrate.neo4j()` procedure, you can access Neo4j and migrate your data to Memgraph. +The resulting nodes and edges are converted into a stream of rows which can include labels, properties, and primitives. +**Streaming of raw node and relationship objects is not supported**, and users are advised to migrate all the necessary identifiers +in order to recreate the same graph in Memgraph. + +{

Input:

} + +- `label_or_rel_or_query: str` ➡ Label name (written in format `(:Label)`), relationship name (written in format `[:rel_type]`) or a plain cypher query. +- `config: mgp.Map` ➡ Connection parameters (as in `gqlalchemy.Neo4j`). Notable parameters are `host[String]` and `port[Integer]`. +- `config_path` ➡ Path to a JSON file containing configuration parameters. +- `params: mgp.Nullable[mgp.Any] (default=None)` ➡ Query parameters (if applicable). + +{

Output:

} + +- `row: mgp.Map` ➡ The result table as a stream of rows. + - When retrieving nodes using the `(:Label)` syntax, row will have the following keys: `labels` and `properties`. + - When retrieving relationships using the `[:REL_TYPE]` syntax, row will have the following keys: `from_labels`, `to_labels`, `from_properties`, `to_properties` and `edge_properties`. + - When retrieving results using a plain Cypher query, row will have keys identical to the returned column names from the Cypher query. + +{

Usage:

} + +#### Retrieve nodes of certain label and create them in Memgraph +```cypher +CALL migrate.neo4j('(:Person)', {host: 'localhost', port: 7687}) +YIELD row +WITH row.labels AS labels, row.properties as props +CREATE (n:labels) SET n += row.props +``` + +#### Retrieve relationships of certain type and create them in Memgraph +```cypher +CALL migrate.neo4j('[:KNOWS]', {host: 'localhost', port: 7687}) +YIELD row +WITH row.from_labels AS from_labels, + row.to_labels AS to_labels, + row.from_properties AS from_properties, + row.to_properties AS to_properties, + row.edge_properties AS edge_properties +MATCH (p1:Person {id: row.from_properties.id}) +MATCH (p2:Person {id: row.to_properties.id}) +CREATE (p1)-[r:KNOWS]->(p2) +SET r += edge_properties; +``` + +#### Retrieve information from Neo4j using an arbitrary Cypher query +```cypher +CALL migrate.neo4j('MATCH (n) RETURN count(n) as cnt', {host: 'localhost', port: 7687}) +YIELD row +RETURN row.cnt as cnt; +``` + +--- + ### `oracle_db()` With the `migrate.oracle_db()` procedure, you can access Oracle DB and migrate your data to Memgraph. diff --git a/pages/advanced-algorithms/install-mage.mdx b/pages/advanced-algorithms/install-mage.mdx index c1430af82..5a36004f6 100644 --- a/pages/advanced-algorithms/install-mage.mdx +++ b/pages/advanced-algorithms/install-mage.mdx @@ -11,11 +11,6 @@ import { Callout } from 'nextra/components' Use MAGE with an instance installed within a [Docker container](#docker) or on [Linux](#linux). -The execution of graph algorithms can be accelerated with the GPU, by using the -[Memgraph X NVIDIA -cuGraph](#mage--nvidia-cugraph) version of the -library. - ## Docker [Install Memgraph with Docker](/getting-started/install-memgraph/docker) using @@ -27,11 +22,11 @@ data. You can download a specific version of MAGE -For example, if you want to download version `1.1`, you should run the following +For example, if you want to download version `3.1.1`, you should run the following command: ```shell -docker run -p 7687:7687 --name memgraph memgraph/memgraph-mage:1.1 +docker run -p 7687:7687 --name memgraph memgraph/memgraph-mage:3.1.1-memgraph-3.1.1 ``` @@ -65,7 +60,7 @@ Run the following commands: ```bash sudo apt-get update && sudo apt-get install -y \ libcurl4 \ - libpython3.9 \ + libpython3.12 \ libssl-dev \ openssl \ build-essential \ @@ -78,8 +73,10 @@ sudo apt-get update && sudo apt-get install -y \ python3-dev \ clang \ git \ - --no-install-recommends \ -&& sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + pkg-config \ + uuid-dev \ + libxmlsec1-dev xmlsec1 \ + --no-install-recommends ``` {

Download the MAGE source code

} @@ -90,15 +87,31 @@ Clone the [MAGE source code](https://github.com/memgraph/mage) from GitHub: git clone --recurse-submodules https://github.com/memgraph/mage.git && cd mage ``` +{

Set up the toolchain

} + +Download and install the [Memgraph Toolchain](https://memgraph.com/docs/getting-started/build-memgraph-from-source#toolchain-installation-procedure): +```bash +curl -L https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-v6/toolchain-v6-binaries-ubuntu-24.04-amd64.tar.gz -o toolchain.tar.gz +sudo tar xzvfm toolchain.tar.gz -C /opt +``` + +Install runtime dependencies for the toolchain: +```bash +cd mage +sudo .cpp/memgraph/environment/os/install_deps.sh install TOOLCHAIN_RUN_DEPS +``` + {

Install Rust and Python dependencies

} Run the following command to install Rust and Python dependencies: ```shell -curl https://sh.rustup.rs -sSf | sh -s -- -y \ -&& export PATH="/root/.cargo/bin:${PATH}" \ -&& python3 -m pip install -r /mage/python/requirements.txt \ -&& python3 -m pip install torch-sparse torch-cluster torch-spline-conv torch-geometric torch-scatter -f https://data.pyg.org/whl/torch-1.12.0+cu102.html \ +curl https://sh.rustup.rs -sSf | sh -s -- -y +export PATH="/root/.cargo/bin:${PATH}" +python3 -m pip install -r python/requirements.txt +python3 -m pip install -r cpp/memgraph/src/auth/reference_modules/requirements.txt +python3 -m pip install torch-sparse torch-cluster torch-spline-conv torch-geometric torch-scatter -f https://data.pyg.org/whl/torch-2.3.0+cpu.html +python3 -m pip install dgl -f https://data.dgl.ai/wheels/torch-2.3/repo.html ``` {

Run the `setup` script

} @@ -106,7 +119,9 @@ curl https://sh.rustup.rs -sSf | sh -s -- -y \ Run the following command: ```shell -sudo python3 setup build -p /usr/lib/memgraph/query_modules +source /opt/toolchain-v6/activate +python3 setup build +sudo cp -r dist/* /usr/lib/memgraph/query_modules ``` @@ -116,13 +131,13 @@ If you don't need all of the algorithms you can build only some of them based on To build C++ based algorithms run: ```shell -sudo python3 setup build -p /usr/lib/memgraph/query_modules --lang cpp +python3 setup build --lang cpp ``` To build Python based algorithms run: ```shell -sudo python3 setup build -p /usr/lib/memgraph/query_modules --lang python +python3 setup build --lang python ``` @@ -152,139 +167,3 @@ If your changes are not loaded, make sure to restart the instance by running `systemctl stop memgraph` and `systemctl start memgraph`. - -## MAGE × NVIDIA cuGraph on Docker - - - -At the moment, no new images are built. If you would benefit from new images, -please let us know by creating a GitHub issue on the [MAGE -repository](https://github.com/memgraph/mage). - - - -Follow this guide to install Memgraph with [**NVIDIA -cuGraph**](https://github.com/rapidsai/cugraph) GPU-powered graph algorithms. - - - -{

Prerequisites

} - -To be able to run cuGraph analytics, make sure you have compatible -infrastructure. The exact system requirements are available at the [**NVIDIA -RAPIDS site**](https://rapids.ai/start.html#requirements), and include an NVIDIA -Pascal (or better) GPU and up-to-date CUDA & NVIDIA drivers. - -If you want to run MAGE × NVIDIA cuGraph in Docker, install: - -- Docker -- Official [**NVIDIA driver**](https://www.nvidia.com/download/index.aspx) for - your operating system. -- To run on NVIDIA-powered GPUs, RAPIDS requires Docker CE v19.03+ and - [**nvidia-container-toolkit**](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker) - installed. -- Legacy Docker CE v17-18 users require the installation of the - [**nvidia-docker2**]() - package. - -{

Download the image from Docker Hub

} - -Pull the image and run it: - -```shell -docker run --rm --gpus all -p 7687:7687 -p 7444:7444 memgraph/memgraph-mage:1.3-cugraph-22.02-cuda-11.5 -``` - -Depending on your environment, different versions of MAGE-cuGraph-CUDA can be -installed: - -```shell -docker run --gpus all -p 7687:7687 -p 7444:7444 memgraph/memgraph-mage:${MAGE_VERSION}-cugraph-${CUGRAPH_VERSION}-cuda-${CUDA_VERSION} -``` - -To see the available versions, explore Memgraph's Docker Hub and search for the -images tagged [**memgraph-mage**](https://hub.docker.com/r/memgraph/memgraph-mage/tags). - -
- -## MAGE × NVIDIA cuGraph on Linux - - - -At the moment, no new images are built. If you would benefit from new images, -please let us know by creating a GitHub issue on the [MAGE -repository](https://github.com/memgraph/mage). - - - -To use the MAGE × [**NVIDIA cuGraph**](https://github.com/rapidsai/cugraph) with -[installed Linux based Memgraph package](https://memgraph.com/download) you need -to install it natively from the source - - - -{

Prerequisites

} - -To be able to run cuGraph analytics, make sure you have compatible -infrastructure. The exact system requirements are available at the [**NVIDIA -RAPIDS site**](https://rapids.ai/start.html#requirements), and include an NVIDIA -Pascal (or better) GPU and up-to-date CUDA & NVIDIA drivers. - -If building MAGE × NVIDIA cuGraph locally, these requirements apply (tested on -Ubuntu): - -If you want to build MAGE × NVIDIA cuGraph locally, install: - -- Official [**NVIDIA driver**](https://www.nvidia.com/download/index.aspx) for - your operating system. -- [**CMake**](https://cmake.org/) version above 3.20 -- [**NVIDIA CUDA developer toolkit**](https://developer.nvidia.com/cuda-toolkit) - – CUDA version 11.6 -- System dependencies: `libblas-dev`, `liblapack-dev`, `libboost-all-dev` -- [**NVIDIA NCCL communications library**](https://developer.nvidia.com/nccl) - -{

Make sure the instance is not running

} - -Algorithms and query modules will be loaded into a Memgraph instance on startup -once you install MAGE, so make sure your instances are not running. - -{

Download the source code

} - -Download the MAGE source code from [**GitHub**](https://github.com/memgraph/mage): - -``` -git clone https://github.com/memgraph/mage.git -``` - -{

Run the `setup` script

} - -Run the script to generate a `dist` directory with all the needed files: -```shell -python3 setup build -p /usr/lib/memgraph/query_modules --gpu -``` - -It will also copy the contents of the newly created `dist` directory to -`/usr/lib/memgraph/query_modules`. - -The `--gpu` flag enables building the cuGraph dependencies and creating the -shared library with cuGraph algorithms that are loaded into Memgraph. - -If something isn't installed properly, the `setup` script will stop the -installation process. If you have any questions, contact us on -**[Discord](https://discord.gg/memgraph).** - -{

Start a Memgraph instance

} - -Algorithms and query modules will be loaded into a Memgraph instance on startup - -If your instance was already running you will need to execute the following -query to load them: - -``` -CALL mg.load_all(); -``` - -If your changes are not loaded, make sure to restart the instance by running -`systemctl stop memgraph` and `systemctl start memgraph`. - -
\ No newline at end of file diff --git a/pages/custom-query-modules.mdx b/pages/custom-query-modules.mdx index 36b607926..3eb01144c 100644 --- a/pages/custom-query-modules.mdx +++ b/pages/custom-query-modules.mdx @@ -23,7 +23,7 @@ and **Rust**. These procedures are grouped into modules - **query module** files (either `*.so` or `*.py` files). -# Developing your custom query module +## Developing your custom query module To develop your custom query module procedures you can follow the guides for each language: @@ -58,7 +58,7 @@ would be mapped in the Cypher query language as `example.procedure()` and Each query module file can contain multiple read and write procedures and functions. -# Modifying the existing query modules +## Modifying the existing query modules If existing MAGE library modules almost meet your needs, consider modifying them and make a contribution to the Memgraph Mage library. @@ -81,15 +81,12 @@ Then, select a language you want to develop in. {

Download the MAGE image

} - Run the following command to get the Memgraph and MAGE development Docker image: + Run the following commands to get the Memgraph and MAGE Docker image and download the toolchain used for building modules: ```shell - docker run -p 7687:7687 memgraph/memgraph-mage:-dev + docker run -p 7687:7687 memgraph/memgraph-mage: ``` - By running this command, you will get an image with the following tools - installed: `Python3`, `Rust`, `Clang`, `Make`, and `CMake`. - {

Develop a query

} When developing with Mage, take a look at the basis of developed [algorithms and utility procedures](https://github.com/memgraph/mage) and extend based on that. @@ -106,15 +103,26 @@ Then, select a language you want to develop in. Use the following command to start the MAGE container: ```shell - docker run --rm -p 7687:7687 --name mage memgraph-mage:version-dev + docker run --rm -p 7687:7687 --name mage memgraph-mage: ``` - Be sure to replace the version with the specific version, for example: + Be sure to replace the `` with the specific version, for example: ```shell - docker run --rm -p 7687:7687 --name mage memgraph-mage:1.4-dev + docker run --rm -p 7687:7687 --name mage memgraph-mage:3.1.1 ``` + {

Download and install toolchain and development dependencies

} + + Run the `make-dev-container.sh` script as `root` within the container to download the current toolchain version and install required `apt` packages: + + ```shell + docker exec -i -u root mage bash -c "./make-dev-container.sh" + ```` + + By running this command, your your container will have the following tools + installed: `Python3`, `Rust`, `Clang`, `Make`, and `CMake` alongside the toolchain used to build both Memgraph and MAGE. + {

Copy the files to the container

} Copy the files to the container named `mage`: @@ -125,10 +133,10 @@ Then, select a language you want to develop in. {

Enter the container

} - Position yourself inside the container as `root`: + Position yourself inside the container as `memgraph`: ```shell - docker exec -u root -it mage /bin/bash + docker exec -u memgraph -it mage /bin/bash ``` @@ -144,10 +152,16 @@ Then, select a language you want to develop in. {

Build MAGE

} - Build MAGE with the option to copy executables from `mage/dist` to `/usr/lib/memgraph/query_modules`: + Activate the toolchain and build MAGE: ```shell - python3 setup build -p /usr/lib/memgraph/query_modules/ + source /opt/toolchain-v6/activate + python3 setup build + ``` + + Then copy executables from `/mage/dist` to `/usr/lib/memgraph/query_modules` as `root`: + ```shell + docker exec -i -u root mage bash -c "cp -vr /mage/dist/* /usr/lib/memgraph/query_modules/" ``` {

Exit the container

} @@ -389,6 +403,11 @@ Then, select a language you want to develop in. + + + We currently do not produce MAGE images with cuGraph (since version 1.3). If this is something you require, please raise an [issue](https://github.com/memgraph/mage/issues) + + {

Download MAGE source code

} diff --git a/pages/data-migration.mdx b/pages/data-migration.mdx index 5a8cccc0b..5e068678a 100644 --- a/pages/data-migration.mdx +++ b/pages/data-migration.mdx @@ -72,7 +72,12 @@ Lab or mgconsole](/data-migration/cypherl). ## Neo4j Export the data into a CSV file and import it into Memgraph using the LOAD CSV -clause, like in this [example](/data-migration/migrate-from-neo4j). +clause, like in this [example](/data-migration/migrate-from-neo4j). + +Alternatively, you can use the [`migrate` +module](/advanced-algorithms/available-algorithms/migrate) which allows you to +[access data from a Neo4j +database](/advanced-algorithms/available-algorithms/migrate#neo4j). ## Data from an application or a program diff --git a/pages/database-management/backup-and-restore.mdx b/pages/database-management/backup-and-restore.mdx index 74b17f982..5a29f8df8 100644 --- a/pages/database-management/backup-and-restore.mdx +++ b/pages/database-management/backup-and-restore.mdx @@ -74,7 +74,7 @@ Follow these steps to create database backup: Issue the following command from an already running Memgraph instance: ``` -RECOVER SNAPSHOT /path/to/snapshot [FORCE]; +RECOVER SNAPSHOT "/path/to/snapshot" [FORCE]; ``` The query will try to copy the defined file into the local data directory and diff --git a/pages/getting-started/install-memgraph/docker.mdx b/pages/getting-started/install-memgraph/docker.mdx index 2900bdc29..6f5173e17 100644 --- a/pages/getting-started/install-memgraph/docker.mdx +++ b/pages/getting-started/install-memgraph/docker.mdx @@ -34,9 +34,7 @@ The main repositories that contain `memgraph` are: - `memgraph/memgraph-mage` - includes Memgraph database, command-line interface [`mgconsole`](/getting-started/cli) and [`MAGE`](/advanced-algorithms) graph - algorithms library. If tagged with cuGraph, it also includes [NVIDIA cuGraph - GPU-powered](/advanced-algorithms/available-algorithms/cugraph) graph - algorithms. + algorithms library. - `memgraph/memgraph` - includes Memgraph database and command-line interface [`mgconsole`](/getting-started/cli). @@ -90,6 +88,14 @@ libraries](/client-libraries) and follow their getting started guide. ### Run Memgraph MAGE Docker image + cuGraph + + +These instructions are listed here as a reference for legacy installations. + +We currently do not produce MAGE images with cuGraph (since version 1.3). If this is something you require, please raise an [issue](https://github.com/memgraph/mage/issues) + + + {

Check prerequisites

} diff --git a/pages/querying/differences-in-cypher-implementations.mdx b/pages/querying/differences-in-cypher-implementations.mdx index 69a153dd9..91cb13697 100644 --- a/pages/querying/differences-in-cypher-implementations.mdx +++ b/pages/querying/differences-in-cypher-implementations.mdx @@ -184,13 +184,6 @@ In other cases, Memgraph does not yet support patterns in functions, e.g. `size( Most of the time, the same functionalities can be expressed differently in Memgraph using `OPTIONAL` expansions, function calls, etc. -{

List comprehension

} -The following type of query is not yet supported in Memgraph: -```cypher -MATCH (keanu:Person {name:'Keanu Reeves'}) -RETURN [x IN keanu.resume WHERE x contains 'The Matrix'] AS matrixList -``` - ### Unsupported expressions {

Cypher expressions

} diff --git a/pages/querying/expressions.mdx b/pages/querying/expressions.mdx index 11d1fb45b..a7b4c3b27 100644 --- a/pages/querying/expressions.mdx +++ b/pages/querying/expressions.mdx @@ -2,6 +2,8 @@ title: Expressions description: With Memgraph's rich expression capabilities, advanced computations and data processing are at your fingertips. Explore our extensive documentation and other resources for more. --- +import {CommunityLinks} from '/components/social-card/CommunityLinks' + # Expressions @@ -215,3 +217,66 @@ WITH keanu,[(keanu)-->(b:Movie) | b.title] + [(keanu)-->(b:Movie) | b.released] SET keanu.resume = movieTitles RETURN keanu.resume ``` + +## List comprehension + +List comprehension is a syntactic construct in Cypher that allows for the +creation of a new list by evaluating an expression over each element of an +existing list, optionally filtering elements based on a predicate. This feature +is particularly useful for transforming and filtering data within queries. + +The general syntax for list comprehension in Cypher is: + +```cypher +[variable IN list [WHERE predicate] | expression] +``` + +- **`variable`**: Represents each element in the original list. +- **`list`**: The original list to iterate over. +- **`predicate`** (optional): A condition that filters elements; only elements satisfying this condition are processed. +- **`expression`**: An expression applied to each filtered element; the results form the new list. + +**Examples:** + +1. **Transforming a list:** + + To create a list of squares from a list of numbers: + + ```cypher + RETURN [x IN [1, 2, 3, 4] | x * x] AS squares + ``` + + **Result:** `[1, 4, 9, 16]` + +2. **Filtering a list:** + + To filter out even numbers from a list: + + ```cypher + RETURN [x IN [1, 2, 3, 4] WHERE x % 2 <> 0] AS oddNumbers + ``` + + **Result:** `[1, 3]` + +3. **Combining transformation and filtering:** + + To create a list of squares of even numbers: + + ```cypher + RETURN [x IN [1, 2, 3, 4] WHERE x % 2 = 0 | x * x] AS evenSquares + ``` + + **Result:** `[4, 16]` + +4. **Extracting node properties:** + + Assuming a graph where `Person` nodes are connected to `Movie` nodes with an `ACTED_IN` relationship, to retrieve the titles of movies released after the year 2000 that a person named 'Alice' acted in: + + ```cypher + MATCH (alice:Person {name: 'Alice'})-[:ACTED_IN]->(movie:Movie) + RETURN [m IN collect(movie) WHERE m.released > 2000 | m.title] AS recentMovies + ``` + + **Result:** A list of movie titles released after 2000 that 'Alice' acted in. + + \ No newline at end of file diff --git a/pages/release-notes.mdx b/pages/release-notes.mdx index 2f8731e70..733ae89a5 100644 --- a/pages/release-notes.mdx +++ b/pages/release-notes.mdx @@ -60,6 +60,104 @@ updated. ## 🚀 Latest release +### Memgraph v3.1.1 - Mar 28th, 2025 + +{

✨ New features

} + +- Added list comprehension Cypher feature. It's now possible to execute queries + like `MATCH (x) RETURN [(x)-->(y) | y.prop];`. + [#2656](https://github.com/memgraph/memgraph/pull/2656) +- Added `--storage-access-timeout-sec` flag. Previously the access timeout was + hardcoded to 1sec. Now users can define an appropriate timeout for their + workflow at startup. [#2831](https://github.com/memgraph/memgraph/pull/2831) + +{

🛠️ Improvements

} + +- Added OIDC SSO quality of life change. Previously, the first role from the + roles field would always get picked even if it wasn't in the mappings. Allow + multiple roles to be present in the roles field, but only if all those are in + role mappings and mapped to the same Memgraph role. + [#2799](https://github.com/memgraph/memgraph/pull/2799) +- Allow redirecting to nonlocalhost and HTTPS in SAML SSO. `CALLBACK_URL` can + now use HTTPS and isn't hardcoded to the localhost. + [#2799](https://github.com/memgraph/memgraph/pull/2799) + +{

🐞 Bug fixes

} + +- Timeout for `SwapMainUUIDRpc` message is now properly configured with the + default value set to 10s. Users shouldn't expect any difference in the + replication behavior. [#2826](https://github.com/memgraph/memgraph/pull/2826) +- Install correct SAML dependencies under MAGE. SAML SSO should now work + correctly MAGE. [#2829](https://github.com/memgraph/memgraph/pull/2829) +- `EnableWritingOnMainRpc` will now be sent when the failover occurs, even if + the network identity of some of the replicas isn't stable. Users will now be + able to test HA in a docker-compose environment. + [#2817](https://github.com/memgraph/memgraph/pull/2817) +- Fixed deadlock caused by write queries and periodic snapshots. + [2819](https://github.com/memgraph/memgraph/pull/2819) +- Broken migration from old durable auth data. Migration is now fixed, and + pre-v3.1 auth data can be correctly read. Users can upgrade to v3.1 without + encountering authentication problems. + [2820](https://github.com/memgraph/memgraph/pull/2820) +- RPC timeouts for messages requesting promotion, demotion, enabling writing on + main and databases' history will now work correctly. Users shouldn't observe + long-running RPCs in their HA environment anymore. + [#2813](https://github.com/memgraph/memgraph/pull/2813) +- Memgraph DB doesn't know how it will get deployed on K8s. It is possible to + abstract multiple coordinators under the same load balancer. In that case, + the Bolt server is the same for all coordinators. Previously, the code didn't + allow adding multiple coordinators with the same Bolt server. Now, the users + will be able to do that. + [#2801](https://github.com/memgraph/memgraph/pull/2801) +- Fix the segfault issue caused by a double free. It only happens when Python + procedures are called in IN_MEMORY_ANALYTICAL mode. + [#2804](https://github.com/memgraph/memgraph/pull/2804) +- The serialization reader would throw if data from the buffer weren't fully + ready. That caused network connections between the main and replica to be + constantly dying. Now, when the replica doesn't read all data from the + buffer, the exception thrown in the SLK part of the code is handled properly, + avoiding the connection drop. Additionally, the PR tries to reduce the + massive amount of logs produced in HA code when trace log level is used. + [#2770](https://github.com/memgraph/memgraph/pull/2770) +- `SnapshotRpc`, `WalFilesRpc`, and `CurrentWalRpc` will now wait for a main + lock but for a maximum time of 30s. If the lock cannot be acquired within the + 30s on the replica, the main try to replicate again after a few seconds. Such + timeout is added to prevent a possible deadlock when multiple fast failovers + happen during transaction execution while the recovery process is in place. + Users should observe the same behavior as before. + [#2816](https://github.com/memgraph/memgraph/pull/2816) + +### MAGE v3.1.1 - Mar 28th, 2025 + +{

✨ New features

} + +- Added migration module from Neo4j. Users can now seamlessly insert data by + using one single Cypher query to migrate their data from Neo4j. Query is + performed with the `CALL migrate.neo4j()` procedure + [#557](https://github.com/memgraph/mage/pull/557) + +{

🛠️ Improvements

} + +- Added `gdb` to and full MAGE repo source to the RelWithDebInfo Docker image. + This will allow for debugging instances without requiring a connection to the + internet [#579](https://github.com/memgraph/mage/pull/579) +- Reduced image size by cleaning up after installing packages. + [#568](https://github.com/memgraph/mage/pull/568), + [#564](https://github.com/memgraph/mage/pull/564) + +{

🐞 Bug fixes

} + +- Set default shell for `memgraph` user to `/bin/bash` for consistency with all + previous Docker images. This should not change anything from the user's + perspective [#577](https://github.com/memgraph/mage/pull/577) +- The `export_util` query module didn't specify the export encoding. If your + data had special characters not supported by ASCII, they would be saved as + garbage in the exported file, or the export would fail. We have fixed this + by predefining the UTF-8 encoding in the export utility to support special + characters [#554](https://github.com/memgraph/mage/pull/554) + +## Previous releases + ### Memgraph v3.1.0 - Mar 12th, 2025 {

⚠️ Breaking changes

} @@ -289,8 +387,6 @@ updated. -## Previous releases - ### Memgraph v3.0.0 - Jan 29th, 2025 {

⚠️ Breaking changes

}