Skip to content

Commit 9a08f61

Browse files
katarinasupeJosipmrdenas51340gitbuda
authored
Add Memgraph 2.22.1 changes (#1079)
Co-authored-by: Josipmrden <[email protected]> Co-authored-by: Andi Skrgat <[email protected]> Co-authored-by: Marko Budiselić <[email protected]>
1 parent a5a264a commit 9a08f61

File tree

11 files changed

+174
-11
lines changed

11 files changed

+174
-11
lines changed

pages/clustering/high-availability.mdx

+42-1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,20 @@ use bolt+routing in different programming languages [here](https://github.com/me
6868
It is important to note that setting up the cluster on one coordinator (registration of data instances and coordinators, setting main) must be done using bolt connection
6969
since bolt+routing is only used for routing data-related queries, not coordinator-based queries.
7070

71+
## System configuration
72+
73+
<Callout type="warning">
74+
Important note if you're using native Memgraph deployment with Red Hat.
75+
76+
Red Hat uses SELinux to enforce security policies.
77+
SELinux (Security-Enhanced Linux) is a security mechanism for implementing mandatory access control (MAC) in the Linux kernel.
78+
It restricts programs, users, and processes to only the resources they require, following a least-privilege model.
79+
When deploying Memgraph with high availability (HA), consider checking out this attribute for instance visibility and
80+
setting the level of security mechanism to permissive.
81+
82+
This rule could also apply to CentOS and Fedora, but at the moment it's not tested and verified.
83+
</Callout>
84+
7185
## Starting instances
7286

7387
You can start the data and coordinator instances using environment flags or configuration flags.
@@ -199,6 +213,17 @@ ADD COORDINATOR 3 WITH CONFIG {"bolt_server": "127.0.0.1:7693", "coordinator_ser
199213

200214
</Callout>
201215

216+
### Remove coordinator instance
217+
218+
If during cluster setup or at some later stage of cluster life, the user decides to remove some coordinator instance, `REMOVE COORDINATOR` query can be used.
219+
Only on leader can this query be executed in order to remove followers. Current cluster's leader cannot be removed since this is prohibited
220+
by NuRaft. In order to remove the current leader, you first need to trigger leadership change.
221+
222+
```plaintext
223+
REMOVE COORDINATOR <COORDINATOR-ID>;
224+
```
225+
226+
202227
### Set instance to MAIN
203228

204229
Once all data instances are registered, one data instance should be promoted to MAIN. This can be achieved by using the following query:
@@ -276,6 +301,22 @@ followers will execute actions in this exact order:
276301
SHOW INSTANCES;
277302
```
278303

304+
### Show instance
305+
306+
You can check the state of the current coordinator to which you are connected by running the following query:
307+
308+
```plaintext
309+
SHOW INSTANCE;
310+
```
311+
312+
This query will return the information about:
313+
1. instance name
314+
2. external bolt server to which you can connect using Memgraph clients
315+
3. coordinator server over which Raft communication is done
316+
4. management server which is also used for inter-coordinators communication and
317+
5. cluster role: whether the coordinator is currently a leader of the follower.
318+
319+
279320
## Setting config for highly-available cluster
280321

281322
There are several flags that you can use for managing the cluster. Flag `--management-port` is used by both data instances
@@ -748,4 +789,4 @@ that and automatically promote the first alive REPLICA to become the new MAIN. T
748789

749790
</Steps>
750791

751-
<CommunityLinks/>
792+
<CommunityLinks/>

pages/custom-query-modules/manage-query-modules.mdx

+8-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,14 @@ update was successful.
124124

125125
### `mg.load`
126126

127-
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.
127+
Loads or reloads the given module. The module name provided in the input file is a module name string without the file extension.
128+
A module can only be reloaded if it is not in use and if it exists in the module directory.
129+
If the module that would be reloaded is being used by another thread while this is run, then this will fail
130+
the error: `Unable to unload module 'module_name', either it doesn't exist, or it is currently being used.
131+
In order to check whether the module exists, please use CALL mg.procedures() YIELD * for custom
132+
query procedures, or CALL mg.functions() YIELD * for custom query functions.`
133+
134+
To resolve this rerun the procedure when the module isn't in use.
128135

129136
Example of a Cypher query:
130137

pages/deployment/aws.mdx

+11-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ Memgraph supports multiple Linux distributions. Memgraph packages for supported
3232
from the [following page](/getting-started/install-memgraph/direct-download-links#linux)
3333

3434
Running Memgraph natively will bring some speed improvements compared to the
35-
Docker version of Memgraph.
35+
Docker version of Memgraph. However, deploying Memgraph with Docker is a more straightforward approach
36+
since it comes with built-in Memgraph MAGE algorithms.
37+
Memgraph MAGE contains graph algorithms and utility modules written in C++, Python and Rust. If you decided to run Memgraph natively, then you need to build MAGE from source, which requires manual work. For native deployment, check the guide on
38+
[how to build Memgraph MAGE algorithms from source](/custom-query-modules#install-mage-and-import-query-modules).
39+
If you're trying out Memgraph for the first time, and running your own benchmarks against it, Docker is the
40+
recommended way to run Memgraph, as it accelerates the time to value.
3641

3742
If you are going to use the Memgraph Docker image, pick the Linux you are most familiar with.
3843

@@ -75,6 +80,10 @@ If you are running Memgraph in `ON_DISK_TRANSACTIONAL` storage mode, you need to
7580
consider the instances [optimized for
7681
storage](https://docs.aws.amazon.com/ec2/latest/instancetypes/so.html).
7782

83+
### System configuration
84+
85+
Before running Memgraph, please check the [system configuration guidelines](/database-management/system-configuration), especially the
86+
`vm.max_map_count` parameter setting.
7887

7988
### Setup the network
8089

@@ -167,7 +176,7 @@ to follow the steps below:
167176
- [Debian](../getting-started/install-memgraph/debian.mdx)
168177
- [Centos](../getting-started/install-memgraph/centos.mdx)
169178
- [Amazon Linux](../getting-started/install-memgraph/amazon-linux.mdx)
170-
- [RedHat](../getting-started/install-memgraph/redhat.mdx)
179+
- [Red Hat](../getting-started/install-memgraph/redhat.mdx)
171180
- [Rocky](../getting-started/install-memgraph/rocky.mdx)
172181

173182
</Tab>

pages/deployment/azure.mdx

+11-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ Memgraph supports multiple Linux distributions. Memgraph packages for supported
3737
from the [following page](/getting-started/install-memgraph/direct-download-links#linux)
3838

3939
Running Memgraph natively will bring some speed improvements compared to the
40-
Docker version of Memgraph.
40+
Docker version of Memgraph. However, deploying Memgraph with Docker is a more straightforward approach
41+
since it comes with built-in Memgraph MAGE algorithms.
42+
Memgraph MAGE contains graph algorithms and utility modules written in C++, Python and Rust. If you decided to run Memgraph natively, then you need to build MAGE from source, which requires manual work. For native deployment, check the guide on
43+
[how to build Memgraph MAGE algorithms from source](/custom-query-modules#install-mage-and-import-query-modules).
44+
If you're trying out Memgraph for the first time, and running your own benchmarks against it, Docker is the
45+
recommended way to run Memgraph, as it accelerates the time to value.
4146

4247
If you are going to use the Memgraph Docker image, pick the Linux you are most familiar with.
4348

@@ -79,6 +84,10 @@ If you are running Memgraph in `ON_DISK_TRANSACTIONAL` storage mode, you need to
7984
consider the instances [optimized for
8085
storage](https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/storage-optimized/l-family).
8186

87+
### System configuration
88+
89+
Before running Memgraph, please check the [system configuration guidelines](/database-management/system-configuration), especially the
90+
`vm.max_map_count` parameter setting.
8291

8392
### Network Setup
8493

@@ -165,7 +174,7 @@ to follow the steps below:
165174
- [Debian](../getting-started/install-memgraph/debian.mdx)
166175
- [Centos](../getting-started/install-memgraph/centos.mdx)
167176
- [Amazon Linux](../getting-started/install-memgraph/amazon-linux.mdx)
168-
- [RedHat](../getting-started/install-memgraph/redhat.mdx)
177+
- [Red Hat](../getting-started/install-memgraph/redhat.mdx)
169178
- [Rocky](../getting-started/install-memgraph/rocky.mdx)
170179

171180
</Tab>

pages/deployment/docker.mdx

+6
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ To connect to Memgraph, you can use CLI [mgconsole](/getting-started/cli), prefe
4646
[client](/client-libraries) or visual user interface [Memgraph
4747
Lab](/data-visualization).
4848

49+
## System configuration
50+
51+
Before running Memgraph, please check the [system configuration guidelines](/database-management/system-configuration), especially the
52+
`vm.max_map_count` parameter setting.
53+
54+
4955
## Configure Memgraph
5056

5157
Memgraph has its configuration settings persisted in the `memgraph.conf` file

pages/deployment/gcp.mdx

+11-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ Memgraph supports multiple Linux distributions. Memgraph packages for supported
3636
from the [following page](/getting-started/install-memgraph/direct-download-links#linux)
3737

3838
Running Memgraph natively will bring some speed improvements compared to the
39-
Docker version of Memgraph.
39+
Docker version of Memgraph. However, deploying Memgraph with Docker is a more straightforward approach
40+
since it comes with built-in Memgraph MAGE algorithms.
41+
Memgraph MAGE contains graph algorithms and utility modules written in C++, Python and Rust. If you decided to run Memgraph natively, then you need to build MAGE from source, which requires manual work. For native deployment, check the guide on
42+
[how to build Memgraph MAGE algorithms from source](/custom-query-modules#install-mage-and-import-query-modules).
43+
If you're trying out Memgraph for the first time, and running your own benchmarks against it, Docker is the
44+
recommended way to run Memgraph, as it accelerates the time to value.
4045

4146
If you are going to use the Memgraph Docker image, pick the Linux you are most familiar with.
4247

@@ -86,6 +91,10 @@ If you are running Memgraph in `ON_DISK_TRANSACTIONAL` storage mode, you need to
8691
consider the instances [optimized for
8792
storage](https://cloud.google.com/compute/docs/storage-optimized-machines).
8893

94+
### System configuration
95+
96+
Before running Memgraph, please check the [system configuration guidelines](/database-management/system-configuration), especially the
97+
`vm.max_map_count` parameter setting.
8998

9099
### Network Setup
91100

@@ -175,7 +184,7 @@ to follow the steps below:
175184
- [Debian](../getting-started/install-memgraph/debian.mdx)
176185
- [Centos](../getting-started/install-memgraph/centos.mdx)
177186
- [Amazon Linux](../getting-started/install-memgraph/amazon-linux.mdx)
178-
- [RedHat](../getting-started/install-memgraph/redhat.mdx)
187+
- [Red Hat](../getting-started/install-memgraph/redhat.mdx)
179188
- [Rocky](../getting-started/install-memgraph/rocky.mdx)
180189

181190
</Tab>

pages/deployment/linux.mdx

+5
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ Memgraph instance, or the instance, needs to be exposed to the internet.
6161
If you are unable to connect to a remote Memgraph instance, keep in mind that
6262
your firewall environment may be blocking the connection to Memgraph.
6363

64+
### System configuration
65+
66+
Before running Memgraph, please check the [system configuration guidelines](/database-management/system-configuration), especially the
67+
`vm.max_map_count` parameter setting.
68+
6469
## Configure Memgraph
6570

6671
Memgraph has its configuration settings persisted in the `memgraph.conf` file

pages/getting-started/install-memgraph.mdx

+5
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ You don't want to bother with installation? Done!
9999
Register and run a [Memgraph Cloud](https://memgraph.com/cloud) instance with a
100100
2-week trial period.
101101

102+
### System configuration
103+
104+
Before running Memgraph, please check the [system configuration guidelines](/database-management/system-configuration), especially the
105+
`vm.max_map_count` parameter setting.
106+
102107
## System requirements
103108

104109
Below are minimum and recommended system requirements for installing Memgraph.

pages/getting-started/install-memgraph/redhat.mdx

+6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ snapshots between different versions. In that case, please contact the Memgraph
1919
team and we'll help with the migration as much as possible.
2020
</Callout>
2121

22+
<Callout type="warning">
23+
Red Hat uses SELinux to enforce security policies.
24+
SELinux (Security-Enhanced Linux) is a security mechanism for implementing mandatory access control (MAC) in the Linux kernel.
25+
It restricts programs, users, and processes to only the resources they require, following a least-privilege model.
26+
When deploying Memgraph with high availability (HA), consider checking out this attribute for instance visibility.
27+
</Callout>
2228

2329
## Installation guide
2430

pages/querying/functions.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,6 @@ All aggregation functions can be used with the `DISTINCT` operator to perform ca
174174

175175
### Conversion functions
176176

177-
| Name | Signature | Description |
178-
| -------------------- | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
179-
| `convert.str2object` | `convert.str2object(string: string) -> (object: any)` | Converts the input string to an object it presents using Python's `json.dumps` function. |
177+
| Name | Signature | Description |
178+
| -------------------- | ------------------------------------------------------------------ | --------------------------------------------------- |
179+
| `convert.str2object` | `convert.str2object(string: string) -> (object: any)` | Converts the input string to an object it presents. |

pages/release-notes.mdx

+66
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,72 @@ updated.
5050

5151
## 🚀 Latest release
5252

53+
#### Memgraph v2.22.1 - Dec 22, 2024
54+
55+
{<h4>🛠️ Improvements</h4>}
56+
57+
- The `convert.str2object` function was rewritten from Python to C++ so Python
58+
GIL does not bottleneck it. Users are now able to achieve the necessary
59+
parallelization improvements.
60+
[#2532](https://github.com/memgraph/memgraph/pull/2532)
61+
- Added `SHOW INSTANCE` query to expose more information about the coordinator
62+
instance to which the user is connected. The query returns: `instance_name`,
63+
`bolt_server`, `coordinator_server`, `management_server` and `cluster_role`.
64+
[#2526](https://github.com/memgraph/memgraph/pull/2526)
65+
- Added `REMOVE COORDINATOR <ID>` query. Only followers can be removed from
66+
Raft logs. The request to remove a leader won't be accepted in Raft logs.
67+
[#2533](https://github.com/memgraph/memgraph/pull/2533)
68+
- Updated `librdkafka` to v2.6.1. You can expect better stability on the Kafka
69+
streaming side. [#2523](https://github.com/memgraph/memgraph/pull/2523)
70+
71+
{<h4>🐞 Bug fixes</h4>}
72+
73+
- Fixed a bug when a replica received an old WAL file by ignoring it.
74+
Previously, a replica could receive a WAL file that contains all old data. If
75+
that is the case, the old epoch would be added to the history together with
76+
the current durable timestamp on the replica, causing the wrong information
77+
contained inside the replica. Replicas shouldn't naively use data from WAL
78+
files received. [#2552](https://github.com/memgraph/memgraph/pull/2552)
79+
- Fixed a subtle memory leak. The skip_list used for async timers was
80+
previously not being collected. `--query-execution-timeout-sec` caused an
81+
allocation that was small but not free.
82+
[#2539](https://github.com/memgraph/memgraph/pull/2539)
83+
- Fixed error message when unloading query message with a correct description
84+
of what happens. An additional reason why the unloading of a module might
85+
fail is that the module might not exist.
86+
[#2547](https://github.com/memgraph/memgraph/pull/2547)
87+
- Fixed planner so it can always generate at least one valid plan. Valid plans
88+
are currently all the ones that start expanding from a node. There was an
89+
edge case where no valid plan could be constructed, as all constructed plans
90+
would start expanding from an edge without edge indices in place.
91+
[#2543](https://github.com/memgraph/memgraph/pull/2543)
92+
- Fixed the incorrect management of the delta counter metric after the abort.
93+
`SHOW STORAGE INFO` under `unreleased_delta_objects` should be better now.
94+
[#2544](https://github.com/memgraph/memgraph/pull/2544)
95+
- Fixed the case when the database would crash without any valid query plan
96+
generated for a given query. Instead of the crash, the database will throw
97+
the `QueryException`. [#2537](https://github.com/memgraph/memgraph/pull/2537)
98+
and [#2535](https://github.com/memgraph/memgraph/pull/2535)
99+
- Fixed issue with list pattern pattern comprehension under arbitrary
100+
expression. List pattern comprehension is only allowed under `WITH` and
101+
`RETURN` clauses. [#2534](https://github.com/memgraph/memgraph/pull/2534)
102+
- Fixed a bug under after-commit triggers where the database accessor becomes
103+
invalid after the transaction finishes. Before the fix, Memgraph would crash
104+
if the trigger used the access to access the changed entities under the
105+
graph. [#2536](https://github.com/memgraph/memgraph/pull/2536)
106+
- Fixed the case when recovery and promotion are executed concurrently on a
107+
replica. The promotion request will wait for recovery to finish before
108+
preparing storage for the new epoch.
109+
[#2521](https://github.com/memgraph/memgraph/pull/2521)
110+
- Fixed how `metrics` keyword was added to the grammar. The keyword couldn't be
111+
used as a variable name.
112+
[#2502](https://github.com/memgraph/memgraph/pull/2502)
113+
114+
#### MAGE v1.22.1 - Dec 22, 2024
115+
116+
- The MAGE version was only bumped because there is a new version of Memgraph
117+
(v2.22.1). Nothing changed under the MAGE itself.
118+
53119
#### Memgraph v2.22.0 - Nov 27, 2024
54120

55121
{<h4>⚠️ Breaking changes</h4>}

0 commit comments

Comments
 (0)