Releases: memgraph/memgraph
Releases · memgraph/memgraph
v2.12.0
v2.12 - Nov 1, 2023
New features and improvements
- Snapshot and WAL files version have been updated. Snapshot and WAL files created with Memgraph v2.12 and higher won't be usable in previous versions of Memgraph (v2.11.1 and lower). #1281
- Memgraph can now start the instance in any storage mode, defined by the
--storage-mode
configuration flag. - The
SHOW STORAGE INFO;
query now returns memory allocations in B, KiB, MiB, GiB or TiB, rather than just B to make the information easily readable.#1366 - Client libraries you can use to connect to Memgraph are now able to retry the queries in order to complete the transactions successfully. #1361
- Information about the graph after running the
ANALYZE GRAPH;
is now persistent between instance reruns. #1281 - Now, you can employ index hints to fine-tune the planner behavior. #1345
- In certain situations, Memgraph returns a hint to create indexes to speed up read queries. #1343
- The
SHOW INDEX INFO;
now also returns the information about the number of assigned indexes. #1229 - Now, you can register REPLICA instances using DNS names. #1323
- You can now use
keys()
andvalues()
functions to get a list of keys and values of a map.#1246 - You can now use
schema
procedures to get information about nodes and
relationships orconvert.str2object()
function to convert strings to objects using Python'sjson.dumps
function. #1384 - In your custom query modules, you can now remove the last element of a path in C++ API using
path.Pop()
, C API usingmgp_path_pop
and Python API usingpath.pop()
. #1249 KeyExists
function that checks the existance of a key in a map has been added to the C++ API.#1336- You can now change the relationship type using
mgp::Graph::ChangeType
in C++ API andmgp::graph_edge_change_type
in C API.
#1364 - Reading of nodes stored on disk is now 2x faster. #1266
- Searching for relationships stored on disk is now faster due to the ability to expand from a single node, rather than searching through all relationships.#1335
- Due to several smaller improvements, Memgraph uses less memory and the garbage collection is more efficient. #1387
- The query inspection report using
EXPLAIN
andPROFILE
clauses now provides information about the operands of theFilter
operator. #1265 - Queries that have multiple
MATCH
clauses and the results are joined in aWHERE
clause now execute more efficiently, due to the to the newHashJoin
operator. #1226 - The new Cartesian product operator optimizes queries that match nodes without relationship. #1193
- Filtering and producing expressions in WITH and FILTER clauses have been optimized by adding cache. #1432
- The verification of unique and existence constraints has been optimized. Constraints are now verified only when updating node labels or properties, as updates on relationships do not influence constraints. #1341
Bug fixes
- The
DISTINCT
clause no longer influences other aggregates, that is, shows distinct values as exepcted. #1235 - Any attempt to change the isolation level in in-memory analytical and on-disk storage mode will throw an exception. #1367
- A bug that would cause the memory limit not to be honored has been fixed. #1250
- The
SHOW CONFIG;
query now shows the correct values for the configuration settings, even if they were changed during runtime. #1278 - Procedure names of the key:value pairs mapped in a JSON file no longer need to be identical to be correctly mapped. #1252
- There are no longer data discrepancies between a REPLICA instance which is syncin with a new MAIN instance that became MAIN by being upgraded from the REPLICA role. #1370
- A bug has been fixed which would shut down Memgraph when fetching data from SQL database. #1299
- When setting a memory limit using
--memory-limit
config flag, Memgraph now stops the transactions exceeding the limit as expected. #1250 #1340 - Memgraph now throws an exception when its out of memory, insted of not reporting an issue. #1379
v2.11.0
v2.11 - Sep 13, 2023
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:#1183SET 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`;
- The default value of
--bolt-server-name-for-init
is nowNeo4j/v5.11.0 compatible graph database server - Memgraph
. #1183 - 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 - 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 - Updating indices and constraints has been streamlined, significantly improving
execution time for everybody making heavy use of them.
#1159 #1142 - Queries that build maps with multiple same-variable property lookups have been
optimized. #1168 - The batch update of properties improves performance when setting a large
number of properties, as in this example:#1115FOREACH (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"});
- Setting properties is also improved by caching mappings of property name to
internal propertyid
. #1147 - Performance has been improved for concurrent operations contending on the same
node. #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:#1127UNWIND RANGE (1, 500) AS i CREATE (); MATCH (),(),() RETURN COUNT(*);
- 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 - 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 - Users can now call
ToString()
method onmgp::Value
and Memgraph's data
types when writing query modules using C++
API.
#1140 - Trigger functions can now access deleted vertices from deleted edge when
processed. #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 - The C++ API now enables you to change relationship start (from) and end (to)
nodes withmgp::Graph.SetFrom
andmgp::Graph.SetTo
methods. SHOW INDEX INFO
now displays index information in alphabetic order for
easier orientation. #1178- The performance of
DETACH DELETE
query has been improved.
#1078 - The
PROFILE
query now generates a table with operators in the same order as
in the plan constructed with theEXPLAIN
query.
#1024 - The import of relationships in on-disk storage mode can be improved by
switching toREAD ONLY VERTEX MODE;
.
#1157.
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 - When using the C++ API you can now construct
std::set of values
(find unique
values) by iterating overmgp::List
as expected, and successfully perform
any other operations dependent on the STL container requirements.
#1210 - The
mgp::DispatcherGuard
also works as expected now.
#1225
v2.10.1
v2.10.1 - Aug 22, 2023
Improvements and bug fixes
- Improved performance on batch update of properties, e.g.,
MATCH (n) SET n += {prop1:1, prop2:2, ...};
#1115 - Added a delta cache to improve query performance. This helps in situations of repeated reads of vertices which have many delta changes caused by another transaction while the current transaction is operating with snapshot isolation level and so needs to process those deltas. This can be tuned using
--delta-chain-cache-threshold
. #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 includememgraph::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 #1158
v2.10.0
v2.10 - Aug 2, 2023
New features and improvements
- The new multi-tenant support available in the Enterprise Edition of Memgraph enables you to manage multiple isolated databases within a single instance. The primary objective is to facilitate efficient resource isolation, maintain data integrity, and manage access for different clients. #952
- The configuration flag
storage-recover-on-startup
has been deprecated and replaced withdata_recovery_on_startup
to support multi-tenancy. Thestorage-recover-on-startup
can still be used until the next release planned for mid-September. - If you want to replace procedure names your application calls without changing the application code, you can define the mapping of the old and new procedure names in a JSON file, then set the path to the files as the value of the
query-callable-mappings-path
configuration flag. #1018 - The C++ API for writing custom query modules now enables:
- inserting
mgp::Any
datatype into Record. #1094 - comparing two
mgp::Value
variables with the<
operator. #1090 - printing the type of
mgp::Type
enumeration using the<<
operator. For example, if you have amgp::List
list,cout<< list <<endl
will output"list"
. #1080 - printing
mgp::Value
variables (exceptmgp::Path
,mgp::List
andmgp::Map
types) using the<<
operator. #1127 - using the
mgp::Value
variables and all its subtypes (mgp::Map
,mgp::Path
, ...) inside hash structures such asstd::unordered_map
andstd::unordered_set
. #1093 - deleting and updating map elements with
mgp::Map.Update(key, &value)
,mgp::Map.Update(key, &&value)
andmgp::Map.Erase(key)
functions. #1103 - removing properties from nodes with
RemoveProperty()
function and labels withRemoveLabel()
function. #1128 #1126 - Also, the
mgp::Value
wrapper for Memgraph's data types has been extended to return subtypes which are modifiable (non-const). #1099
- inserting
- The C API for writing custom query modules now enables:
- Memgraph supports transaction timeouts defined by the Bolt protocol if the connection to the database is established via the JavaScript client. #1046
- Queries exploring all shortest paths now use considerably less memory without significant performance deterioration. #981
- Users with fine-grained privileges will experience better performance when running queries due to user information cashing. Any changes to the user privileges will be ignored until the next login. #1109
Bug fixes
- Connection with Bolt v5.2 now works as expected when returning a path as a result. #1108
- Serializing vertex and edge properties to RocksDB now works as expected even when the serialization buffer is exactly 15B. #1111
- Users created in the Community Edition persist when the instance is upgraded to an Enterprise Edition. #1067
v2.9.0
v2.9.0 - July 20, 2023
NOTE: In order to enable the REPLICA instances to restart and continue their role in the replication cluster without disconnecting from it, Memgraph 2.9 introduced a new configuration flag --replication-restore-state-on-startup
which is false
by default. Using this configuration flag you decided whether any instance, MAIN or REPLICA, will regain their previous role in the replication cluster. If your current project is using replication and you do not introduce this configuration flag set to true
on MAIN instances, upon restart they will be disconnected from their replication clusters. By setting this configuration flag to true
on REPLICA instances, upon restart REPLICAs will remember their role and configuration in a replication cluster.
New features and improvements
- The new
ON_DISK_TRANSACTIONAL
storage mode allows you to store data on disk rather than in-memory. Check the implementation and implications in the reference guide. #850 - Memgraph now works with all Bolt v5.2 drivers. #938
- The LOAD CSV clause has several new improvements:
- You can now import data from web-hosted CSV files by passing the URL as a file location. You can also import files compressed with
gzip
orbzip2
algorithms. #1027 - To speed up the execution of the
LOAD CSV
clause, you can addMATCH
andMERGE
entities prior to reading the rows from a CSV file. But, theMATCH
orMERGE
clause has to return just one row or Memgraph will throw an exception. #916 - If a certain sequence of characters in a CSV file needs to be imported as null, you can now specify them with the NULLIF option of the LOAD CSV clause. #914
- You can now import data from web-hosted CSV files by passing the URL as a file location. You can also import files compressed with
- You can now use
mgp::Type::Any
while developing a custom query procedure with the C++ API to specify that the argument of the procedure can be of any type. #982 - When you need to differentiate transactions, you can now define and pass transaction metadata via the client and check it in Memgraph by running the
SHOW TRANSACTIONS;
query. #945 - You can now create custom batch procedures in Python and C++ that process data in batches, thus consuming less memory.
#964 - The
ANALYZE GRAPH;
query now includes information about the degree of all nodes to enhance the MERGE optimizations on supernodes. #1026 - The
--replication-restore-state-on-startup
configuration flag allows you to define whether instances in the replication cluster will regain their roles upon restart (true
) or restart as disconnected "blank" MAIN instances (default settingfalse
). This flag resolved the unwanted behavior of restarted REPLICA instances disconnecting from the cluster, but it also needs to be introduced to MAIN instances so they are not disconnected from the cluster upon restart. #791
Bug fixes
init-file
andinit-data-file
configuration flags allow the execution of queries from a CYPHERL file, prior to or immediately after the Bolt server starts and are now possible to configure in the Community Edition as well. #850- The IN_MEMORY_ANALYTICAL storage mode now deallocates memory as expected and no longer consumes memory excessively. #1025
- When no values are returned from a map, a null is returned instead of an exception occurring. #1039
v2.8.0
v2.8 - May 18, 2023
New features and improvements
- Data recovery is now up to 6x faster depending on the number of available cores, as snapshot loading is distributed among several threads. #868
- During the recovery, indexes can also be created using multiple threads, thus speeding up the process. #882
- Memgraph now exposes system metrics via an HTTP endpoint, so you can get information about transactions, query latency and various other properties. #940
- It’s now possible to use the map projection syntax to create maps. Map projections are convenient for building maps based on existing values and they are used by data access tools like GraphQL and Spring Data. #892
- You can now check if the data directory is (un)locked with the
DATA DIRECTORY LOCK STATUS;
query. #933 - You can now check the current the current storage mode and isolation levels by running the
SHOW STORAGE INFO;
query. #883 - Check the suspected build type of the Memgraph executable by running the
SHOW BUILD INFO;
query. #894 - Performance has been improved by optimizing the deallocation of resources in Memgraph's custom
PoolResource
memory allocator. #898
Bug fixes
v2.7.0
New features and improvements
- You can now choose between two different storage modes:
- Transactional mode - the default database mode that favors
strongly-consistent ACID transactions using WAL files and periodic
snapshots, but requires more time and resources during data import and
analysis. - Analytical mode - speeds up import and data analysis but offers no ACID
guarantees besides manually created snapshots.
Switch between modes within the session using theSTORAGE MODE IN_MEMORY_{TRANSACTIONAL|ANALYTICAL};
query. #772
- Transactional mode - the default database mode that favors
- You can now call subqueries inside existing queries using the CALL clause. #794
- When you want to filter data using properties that all have label:property
indexes set, you can make Memgraph analyze the properties on all or several
labels with theANALYZE GRAPH;
query. By calculating the distribution of
property values, Memgraph will be able to select the optimal index for the
query and it will execute faster. #812 - If, for example, you are no longer interested in the results of the query you
ran, or the procedure you built is running in an infinite loop, you can stop
the transaction with theTERMINATE TRANSACTIONS tid;
query; Find out the
transaction ID withSHOW TRANSACTIONS;
query. #790 - With the new flag
password-encryption-algorithm
you can choose between
bcrypt
,sha256
, andsha256-multiple
encryption algorithms. SHA256 offers
better performance compared to the more secure but less performant bcrypt. #839 - Import using the LOAD CSV clause has been further improved by
Bugfixes
v2.6.0
Major features and improvements
- Importing speed using the LOAD CSV clause has been improved due to two changes:
- Newly implemented
exists()
function allows using patterns as part of the filtering clause. Check the Cypher Manual for usage. #818 - With the new Python mock query module API, you can now develop and test Python query modules for Memgraph without having to run a Memgraph instance. The mock API is compatible with the Python API and thus developed modules can be added to Memgraph as-is. #757
- Memgraph now supports Fedora 36 and Ubuntu 22.04 for ARM. #787 #810
Bug fixes
torch
andigraph
can no longer be removed from thesvs.modules
cache to avoid issues after reload. #720- Newly created nodes now comply with the set label based authorisation rules. #755
- Constructing LocalDateTime objects with invalid parameters doesn’t crash Memgraph anymore, but throws an informative exception. #819
v2.5.2
Bug Fixes
- Variables can be used inside nested FOREACH clauses. #725
- FOREACH clause can now use indexes if needed (e.g. in case of MERGE). #736
- C++ API now allows setting and getting node and relationship properties. #732
- OPTIONAL MATCH can now use label property indexes that are referencing the previously matched variables. #736
- Iterating over all relationships in a graph now works as expected, as well as checking whether the graph contains a given relationship. #743
- Implementation of the All Shortest Paths algorithm was fixed so the paths are no longer duplicated when the upper bound is used. #737
v2.5.1
Bug Fixes
- The
LOAD CSV
clause now uses less RAM to load a wholeCSV
file. #712 read_write_type_checker
logic correction so queries have the rightrw_type
, which was a blocker for use on replicas. #709- Fixed a trigger bug where Memgraph is configured to run without properties on edges. Triggers are now working as expected where there are no properties on edges. #717
qid
now available in transactions as part of metadata. #721