Release Date: 21 October 2015
Neo4j 2.3 is a significant release, that provides read and write performance for massive operational throughput — making it our fastest and most scalable graph database yet.
Highlights
Detailed changes
Cypher Queries
- Added new warning mechanism. The first supported warning is generated for queries that contain a potentially unintended cartesian product
- Fixed a MergeInto bug so that the direction of the relationship is considered when creating relationships
- Generates a warning when a plan using
LOAD CSV
uses MATCH
or MERGE
on a large label without an index
- Generates a warning when a plan using
LOAD CSV
also contains an EagerPipe
- Introduce
STARTS WITH
, ENDS WITH
and CONTAINS
- ShortestPath no longer has a max limit of 15 steps
- Generates a warning when using shortestPath without supplying an upper limit
CREATE
from lists is now deprecated
- Will now allow literals to be placed on the left-hand side of an inequality predicate also when using an index
- MergeInto will now properly take direction into account when creating relationships
- Allow arbitrary expressions for URL in
LOAD CSV
- Support for using compressed data with
LOAD CSV
- Added reverse function for reversing strings
- Unfulfillable index hints (e.g. on non-existing indices) will now produce a warning or throw an error as configured
- Now supports dynamic property lookup (f.e. using n[‘property’])
- Usage of bare node patterns is now deprecated
- Range queries can now be solved using index seeks
- Prefer size() over length() for collections and pattern predicates
- Accept lower case ‘e’ in Cypher exponent double literals
- Added support for join hints:
USING JOIN ON n
- Added
DETACH DELETE
to Cypher
- Fixes a bug where input positions could become wrong on Windows platforms
- The compiler is now preloaded on db startup, minimizing delay of initial query
- Triadic selection is now supported
- Function exists() can now make use of index scans
LIMIT
now properly influence planning costs
- Generates a warning when dynamic property lookup makes index plans impossible
- New constraint type: property existence for nodes and relationships
- Inequality predicates can now be chained on the form:
0 < n.prop < 10
- ShortestPath should now return paths that fulfil any predicates enforced upon it
- The str() function is now deprecated
- Cypher queries will no longer be logged in messages.log
- Removed support for Cypher version 2.0 and 2.1, as announced
- Produces error or warning if a query cannot be solved using the specified planner
- Specifying a default Cypher planner in the settings now only applies to the default language version / parser
- Cypher may now use full index scans to solve queries containing
has(n.prop)
if appropriate
- Correctness fixes to Dijkstra regarding floating point precision, which can now be supplied by user
- Optimizations to Dijkstra where it didn’t terminate as soon as it could have
- Introducing bidirectional Dijkstra algorithm which often out-performs monodirectional Dijkstra
- Shortest path algorithm supports result Path filtering
Kernel
- Fix a bug that caused an incorrect page cache size to be reported when the
dump_configuration
setting was enabled.
- Status codes of the ‘transient’ classification now cause transactions to be rolled back. This resolves several outstanding issues where deadlocks, network errors and other similar problems required clients to manually roll back transactions. Only ClientError and ClientNotification classified status codes leave open transactions running.
- Adds checkpoints to the log, decoupled from log rotation. This allows for asynchronous flushing of the page cache down to storage, resulting in short-to-no pauses for write transactions that would previously occur around log rotation.
- Adds
PropertyContainer#getAllProperties()
, returning a Map<String,Object>
of all properties as a more convenient and more performant way of getting all properties of a Node or Relationship.
- Object cache (i.e. node/relationship/property data cached as java objects in heap) has been removed. This reduces heap usage as well as code complexity, while for most use cases maintaining or surpassing performance levels of 2.2.x.
Cluster
- No longer resolves hostnames into IPs. This should help in data center installations where a hostname might resolve into different IPs depending on which center the server is running in
- Force-elect a demoted node if it is the only option. This happens predominantly in clusters where some members are slave-only.
- No longer logs heartbeat messages since logging may incur I/O waits, which in extension may have an instance appear unavailable with the consequence that master switch happens.
- Fixes an issue where an error during store copy from master might result in instance being forever unable to join cluster until manually restarted.
- Give ongoing transactions a bit of time (10 seconds default) to complete before making a required role switch
Operations
- Neo4j console does not fork a subprocess on Linux, enabling easier process management
- Resolved Github Issue #5531: Added aliases for Host and Port. This stops the java command accidentally have multiple arguments on the command line e.g. -port 1337 -port 1337
- Resolved Github Issue #5533: Added text in the example to explicitly state that the
- Windows Service had already been installed
- Resolved Github Issue #5536: Added link documentation about the
NEO4J_HOME
variable in the online manual
- Adds a Windows PowerShell for managing a Neo4j
Configuration
- Change the default
dbms.pagecache.memory
setting from 75% to 50% of free system memory after the JVM heap.
- Client and transient errors cause transactions to be rolled back immediately, instead of merely be marked as failed with the purpose to fail the upcoming commit.
- Configure http max header sizes with added configuration options:
org.neo4j.server.webserver.max.request.header
org.neo4j.server.webserver.max.response.header
- Configuration for rotating the query log:
dbms.querylog.rotation.threshold
: Specifies at which file size the query log will auto-rotate
dbms.querylog.max_archives
: Specifies maximum number of history files to keep
- With the removal of the object cache, the following settings have been removed:
cache_type
node_cache_size
relationship_cache_size
node_cache_array_fraction
relationship_cache_array_fraction
cache.memory_ratio
high_performance_cache_min_log_interval
Tools
Neo4j Metrics
- Introducing Neo4j Metrics, available for Neo4j Enterprise Edition
- Captures basic metrics: JVM/memory, network activity and transactions
- Feed available to consumers like Graphite, Ganglia or CSV
Neo4j Browser
- New drawer for
:config
settings
:play https://guides.neo4j.com/guide-library.html
can load guide content from URL
- Add config to control outgoing connections (Enterprise Edition)
- Display Cypher warnings in editor gutter
- In
EXPLAIN
and PROFILE
result frames, show Cypher warnings view if warnings exists
- In database drawer: display only labels and rel types in use
- Deprecate webadmin
- Code view of Cypher result frames, displaying information about the HTTP request and response
Import-tool
- Prints help information when no arguments were given
- Root-cause-like stack traces are printed for unexpected errors, regardless of the value of
--stacktrace
that user supplied. That option still controls whether or not stack traces should be printed for common errors, which are usually accompanied by a more descriptive explanation.
- Includes metadata about the store and stored transactions in diagnostics logging during startup.
- Added ability to skip duplicate nodes, i.e. multiple nodes with the same ID in the same id space. Maximum total number of bad entries (nodes and relationships) during an import is still controlled using
--bad-tolerance=<max bad entries>
. Skipping of bad relationships/nodes can be enabled/disabled individually with --skip-duplicate-nodes
and --skip-bad-relationships
.
Consistency Checker
- Additional check for node label id arrays that are not sorted
- Redesign of record access pattern and added parallelization for faster and more scalable operation. The previous behaviour can still be had by adding
--experimental=false
Known Issues
For map keys, not-null predicate does not work. Instead, please use the negation of is-null. Typically this occurs when using LOAD CSV. For example, the following predicate in the
WHERE
clause will not work correctly:
LOAD CSV WITH HEADERS FROM "https://some.valid.url/data.csv"
WITH line
WHERE line.Company IS NOT NULL // Don't do this.
MERGE (c:Company {name: line.Company})
Instead, use this form of the predicate in the WHERE clause:
LOAD CSV WITH HEADERS FROM "https://some.valid.url/data.csv"
WITH line
WHERE NOT line.Company IS NULL // Do this instead.
MERGE (c:Company {name: line.Company})
Upgrade Instructions
All Neo4j users are recommended to upgrade to this release.
Upgrading to Neo4j 2.3.0 requires a migration to the on-disk store and can not be reversed. Please ensure you have a valid backup before proceeding.
Production users should note that there will be configuration changes required, and that applications will need to be updated to support authentication of database requests. Please see our
Upgrading to Neo4j 2.3 FAQ for further details.
(Note: Neo4j 1.9 users may also upgrade directly to this release, and are recommended to do so carefully. We strongly encourage verifying the syntax and validating all responses from your Cypher scripts, REST calls, and Java code before upgrading any production system. For information about upgrading from Neo4j 1.9, please see our
Upgrading to Neo4j 2 FAQ.)