From a7a425d9a62e61c6fe4f4a2b8a16a872744b5372 Mon Sep 17 00:00:00 2001 From: Vlasta Date: Tue, 12 Sep 2023 13:38:02 +0200 Subject: [PATCH 1/6] changelog --- docs/changelog.md | 56 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 0edec8f8380..27c9b0d0913 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -6,6 +6,49 @@ sidebar_label: Changelog import VideoBySide from '@site/src/components/VideoBySide'; +## v2.11 - Sep 13, 2023 + +### New features and improvements + +- During recovery from a snapshot, the recovery of each graph object or property + is no longer logged in the TRACE setting. The log now only indicates the + recovery progress. [#1054](https://github.com/memgraph/memgraph/pull/1054) +- Updating indices and constraints has been streamlined, significantly improving + execution time for everybody making heavy use of them. + [#1159](https://github.com/memgraph/memgraph/pull/1159) +- Queries that build maps with multiple same-variable property lookups have been + optimized. [#1168](https://github.com/memgraph/memgraph/pull/1168) +- The batch update of properties improves performance when setting a large + number of properties, as in this example: + ``` + FOREACH (i in range(0, 1000000) | CREATE (n:Label {id:i})); + + CREATE INDEX ON :Label(id); + + FOREACH (i IN range(0, 1000000, 3) | MERGE (n:Label {id:i}) SET n += {prop2:"a1", prop3:"b2", prop4:"c3", prop5:"d4", prop6:"e5", prop7:"f6", prop8:"g7", prop9:"h8", prop10:"i9", prop11:"j10 q"}); + ``` + [#1115](https://github.com/memgraph/memgraph/pull/1115) +- Performance has been improved for concurrent operations contending on the same + node. [#1187](https://github.com/memgraph/memgraph/pull/1187) +- When a query is executing in many iterations over the graph entities, the + performance has been improved by 100% due to faster scanning of nodes, for example: + ``` + UNWIND RANGE (1, 500) AS i CREATE (); + MATCH (),(),() RETURN COUNT(*); + ``` + [#1127](https://github.com/memgraph/memgraph/pull/1227) +- The query engine is more performant as at all times it is scanning and + expanding nodes instead of scanning both source and destination nodes and + then expanding to the relationship between them. + [#1085](https://github.com/memgraph/memgraph/pull/1085) + +### Bug fixes + +- When projecting a map from a variable that happens to be null, the projection + will have a null value instead of displaying an error. + [#1119](https://github.com/memgraph/memgraph/pull/1119) + + ## v2.10.1 - Aug 22, 2023 ### Improvements and bug fixes @@ -19,17 +62,10 @@ import VideoBySide from '@site/src/components/VideoBySide'; level and so needs to process those deltas. This can be tuned using `--delta-chain-cache-threshold`. [#1124](https://github.com/memgraph/memgraph/pull/1124) -- Concurrent access to the same query module had a race-condition on the - pointer that was used to handle the custom memory management. A mapping has - been added that keeps the information about what thread used what pointer to - handle the memory resources, which should be fine since the respected query - executions are running on a dedicated thread. Access to the mapping itself is - thread-safe. A simple `RWLock` has been implemented here, as we shouldn't - include `memgraph::utils` from this header and a traditional mutex might be - overkill. A simple RAII wrapper for the mapping container has been also added - for simpler client-side use. +- The same query module can now be executed concurrently by different clients. [#1158](https://github.com/memgraph/memgraph/pull/1158) - +- Properties can now be removed from relationships with `RemoveProperty()` + function in C++ API. [#1156](https://github.com/memgraph/memgraph/pull/1156) ## v2.10 - Aug 2, 2023 From 796935048318f74f18319ac1b23ec26f49105ea2 Mon Sep 17 00:00:00 2001 From: Vlasta Date: Tue, 12 Sep 2023 13:55:46 +0200 Subject: [PATCH 2/6] another-pr --- docs/changelog.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 27c9b0d0913..c22d86ebced 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -37,10 +37,14 @@ import VideoBySide from '@site/src/components/VideoBySide'; MATCH (),(),() RETURN COUNT(*); ``` [#1127](https://github.com/memgraph/memgraph/pull/1227) -- The query engine is more performant as at all times it is scanning and - expanding nodes instead of scanning both source and destination nodes and - then expanding to the relationship between them. - [#1085](https://github.com/memgraph/memgraph/pull/1085) +- The query engine is more performant as at all times it is scanning and + expanding nodes instead of scanning both source and destination nodes and + then expanding to the relationship between them. + [#1085](https://github.com/memgraph/memgraph/pull/1085) +- Users can now call `ToString()` method on `mgp::Value` and Memgraph's data + types when writing query modules using [C++ + API](/reference-guide/query-modules/implement-custom-query-modules/api/cpp-api.md). + [#1140](https://github.com/memgraph/memgraph/pull/1140) ### Bug fixes From 4c85430b0dc9df982103a97219d47a9ddc281813 Mon Sep 17 00:00:00 2001 From: Vlasta Date: Wed, 13 Sep 2023 08:18:09 +0200 Subject: [PATCH 3/6] new stuff --- docs/changelog.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index c22d86ebced..fd76f750086 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -10,12 +10,21 @@ import VideoBySide from '@site/src/components/VideoBySide'; ### New features and improvements +- The following configurational settings can now be changed during runtime: + server name, query execution timeout, log level and the option to log to + `stderr`. Use the following queries to set the configuration: + ``` + SET DATABASE SETTING 'server.name' TO 'new-name'; + SET DATABASE SETTING 'query.timeout' TO '100'; + SET DATABASE SETTING 'log.level' TO 'TRACE'; + SET DATABASE SETTING 'log.to_stderr' TO 'true`; + ``` - During recovery from a snapshot, the recovery of each graph object or property is no longer logged in the TRACE setting. The log now only indicates the recovery progress. [#1054](https://github.com/memgraph/memgraph/pull/1054) - Updating indices and constraints has been streamlined, significantly improving execution time for everybody making heavy use of them. - [#1159](https://github.com/memgraph/memgraph/pull/1159) + [#1159](https://github.com/memgraph/memgraph/pull/1159) [#1142](https://github.com/memgraph/memgraph/pull/1142) - Queries that build maps with multiple same-variable property lookups have been optimized. [#1168](https://github.com/memgraph/memgraph/pull/1168) - The batch update of properties improves performance when setting a large @@ -28,6 +37,8 @@ import VideoBySide from '@site/src/components/VideoBySide'; FOREACH (i IN range(0, 1000000, 3) | MERGE (n:Label {id:i}) SET n += {prop2:"a1", prop3:"b2", prop4:"c3", prop5:"d4", prop6:"e5", prop7:"f6", prop8:"g7", prop9:"h8", prop10:"i9", prop11:"j10 q"}); ``` [#1115](https://github.com/memgraph/memgraph/pull/1115) +- Setting properties is also improved by caching mappings of property name to + internal property `id`. [#1147](https://github.com/memgraph/memgraph/pull/1147) - Performance has been improved for concurrent operations contending on the same node. [#1187](https://github.com/memgraph/memgraph/pull/1187) - When a query is executing in many iterations over the graph entities, the @@ -45,12 +56,26 @@ import VideoBySide from '@site/src/components/VideoBySide'; types when writing query modules using [C++ API](/reference-guide/query-modules/implement-custom-query-modules/api/cpp-api.md). [#1140](https://github.com/memgraph/memgraph/pull/1140) +- Trigger functions can now access deleted vertices from deleted edge when + processed. [#1209](https://github.com/memgraph/memgraph/pull/1209) +- When developing query modules using C++ API, you can now get the `In` and + `Out` degrees of a node in O(1) time complexity. [#1217](https://github.com/memgraph/memgraph/pull/1217) +- The C++ API now enables you to change relationship start (from) and end (to) + nodes with `mgp::Graph.SetFrom` and `mgp::Graph.SetTo` methods. +- `SHOW INDEX INFO` now displays index information in alphabetic order for + easier orientation. [#1178](https://github.com/memgraph/memgraph/pull/1178) ### Bug fixes - When projecting a map from a variable that happens to be null, the projection will have a null value instead of displaying an error. [#1119](https://github.com/memgraph/memgraph/pull/1119) +- When using the C++ API you can now construct `std::set of values` (find unique + values) by iterating over `mgp::List` as expected, and successfully perform + any other operations dependent on the STL container requirements. + [#1210](https://github.com/memgraph/memgraph/pull/1210) +- The `mgp::DispatcherGuard` also works as expected now. + [#1225](https://github.com/memgraph/memgraph/pull/1225) ## v2.10.1 - Aug 22, 2023 From b6ed3f733cd3237636da6a10a504146e93303668 Mon Sep 17 00:00:00 2001 From: Vlasta Date: Wed, 13 Sep 2023 09:20:45 +0200 Subject: [PATCH 4/6] PRno --- docs/changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/changelog.md b/docs/changelog.md index da207207a8a..41e4bcb7199 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -19,6 +19,10 @@ import VideoBySide from '@site/src/components/VideoBySide'; SET DATABASE SETTING 'log.level' TO 'TRACE'; SET DATABASE SETTING 'log.to_stderr' TO 'true`; ``` + [#1183](https://github.com/memgraph/memgraph/pull/1183) +- The default value of `--bolt-server-name-for-init` is now `Neo4j/v5.11.0 + compatible graph database server - Memgraph`. + [#1183](https://github.com/memgraph/memgraph/pull/1183) - During recovery from a snapshot, the recovery of each graph object or property is no longer logged in the TRACE setting. The log now only indicates the recovery progress. [#1054](https://github.com/memgraph/memgraph/pull/1054) From ec14934224d4455efca8a41fe43d668d4d3fd845 Mon Sep 17 00:00:00 2001 From: Vlasta Date: Wed, 13 Sep 2023 10:45:41 +0200 Subject: [PATCH 5/6] cpu --- docs/changelog.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 41e4bcb7199..b033818969b 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -21,8 +21,16 @@ import VideoBySide from '@site/src/components/VideoBySide'; ``` [#1183](https://github.com/memgraph/memgraph/pull/1183) - The default value of `--bolt-server-name-for-init` is now `Neo4j/v5.11.0 - compatible graph database server - Memgraph`. - [#1183](https://github.com/memgraph/memgraph/pull/1183) + compatible graph database server - Memgraph`. [#1183](https://github.com/memgraph/memgraph/pull/1183) +- If a certain graph object is changed multiple times as a part of one of many + parallel transactions, the delta chain tracking its changes becomes very long. + Every other parallel transaction dependent on that object needs to access and + process that delta chain to get its correct state, which can be very expensive + regarding CPU usage. Now, Memgraph is caching delta chains of 128 or more + changes that need to be frequently accessed, which eliminates the need of + processing the chain and improves performance. If you would benefit from + changing at what length the delta chain should be cashed, adjust the value of + the `--delta-chain-cache-threshold` configuration flag. [#1124](https://github.com/memgraph/memgraph/pull/1124) - During recovery from a snapshot, the recovery of each graph object or property is no longer logged in the TRACE setting. The log now only indicates the recovery progress. [#1054](https://github.com/memgraph/memgraph/pull/1054) From c2156b6cb163732229a20b00e03b6f4872569934 Mon Sep 17 00:00:00 2001 From: Vlasta Date: Wed, 13 Sep 2023 13:31:53 +0200 Subject: [PATCH 6/6] only-one-left --- docs/changelog.md | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index b033818969b..ced7cadbb1c 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -22,15 +22,17 @@ import VideoBySide from '@site/src/components/VideoBySide'; [#1183](https://github.com/memgraph/memgraph/pull/1183) - The default value of `--bolt-server-name-for-init` is now `Neo4j/v5.11.0 compatible graph database server - Memgraph`. [#1183](https://github.com/memgraph/memgraph/pull/1183) -- If a certain graph object is changed multiple times as a part of one of many - parallel transactions, the delta chain tracking its changes becomes very long. - Every other parallel transaction dependent on that object needs to access and - process that delta chain to get its correct state, which can be very expensive - regarding CPU usage. Now, Memgraph is caching delta chains of 128 or more - changes that need to be frequently accessed, which eliminates the need of - processing the chain and improves performance. If you would benefit from - changing at what length the delta chain should be cashed, adjust the value of - the `--delta-chain-cache-threshold` configuration flag. [#1124](https://github.com/memgraph/memgraph/pull/1124) +- When working at a snapshot isolation level, if a certain graph object is + changed multiple times as a part of one of many parallel transactions, the + delta chain tracking its changes becomes very long. Every other parallel + transaction dependent on that object needs to access and process that delta + chain to get its correct state, which can be very expensive regarding CPU + usage. Now, Memgraph is caching delta chains of 128 or more changes that need + to be frequently accessed, which eliminates the need of processing the chain + and improves performance. If you would benefit from changing at what length + the delta chain should be cashed, adjust the value of the + `--delta-chain-cache-threshold` configuration flag. + [#1124](https://github.com/memgraph/memgraph/pull/1124) - During recovery from a snapshot, the recovery of each graph object or property is no longer logged in the TRACE setting. The log now only indicates the recovery progress. [#1054](https://github.com/memgraph/memgraph/pull/1054) @@ -64,6 +66,10 @@ import VideoBySide from '@site/src/components/VideoBySide'; expanding nodes instead of scanning both source and destination nodes and then expanding to the relationship between them. [#1085](https://github.com/memgraph/memgraph/pull/1085) +- The expansion of node is no longer only done from left to right. Depending on + the previous executions and how many relationships needed to be check on + MERGE, the engine knows the fewest vector necessary to expand. + [#1110](https://github.com/memgraph/memgraph/pull/1110) - Users can now call `ToString()` method on `mgp::Value` and Memgraph's data types when writing query modules using [C++ API](/reference-guide/query-modules/implement-custom-query-modules/api/cpp-api.md). @@ -76,6 +82,15 @@ import VideoBySide from '@site/src/components/VideoBySide'; nodes with `mgp::Graph.SetFrom` and `mgp::Graph.SetTo` methods. - `SHOW INDEX INFO` now displays index information in alphabetic order for easier orientation. [#1178](https://github.com/memgraph/memgraph/pull/1178) +- The performance of `DETACH DELETE` query has been improved. + [#1078](https://github.com/memgraph/memgraph/pull/1078) +- The `PROFILE` query now generates a table with operators in the same order as + in the plan constructed with the `EXPLAIN` query. + [#1024](https://github.com/memgraph/memgraph/pull/1204) +- The import of relationships in on-disk storage mode can be improved by + switching to `READ ONLY VERTEX MODE;`. + [#1157](https://github.com/memgraph/memgraph/pull/1157). + ### Bug fixes