While we've worked hard to make updates to newer versions of Neo4j as pleasant as possible, these are a few things to be aware of, particularly when switching to a major revision.
Neo4j 3.4 Upgrade FAQ
Upgrade FAQs for Neo4j 3.3 and earlier
What is in 3.4?
- Writes are now up to 5x faster for nodes with indexed string properties, thanks to native string indexes.
- A new kernel API streamlines internal instructions.
- New supported data types include date/time format and 3D geospatial data, enabling optimized Cypher queries for searches across time or space. The 3D geospatial search understands both Cartesian Latitude and Longitude coordinates, as well as radial distances and altitude or depth.
- Transaction states consume less memory thanks to various efficiency improvements (including native indexing) working together.
- Internal testing shows that Cypher runtime is 20% faster than for Neo4j 3.3 (Community Edition).
- Multi-Clustering dramatically extends Neo4j scaling options by allowing users to create and manage multiple cluster-based tenants, where each operates within its own scalable Causal Cluster. With Multi-Clustering, users can logically partition graphs or oversee multiple graph database implementations across the enterprise.
- New Cypher runtime in Enterprise Edition is 50-70% faster than Neo4j 3.3.
- Hot backups are now twice as fast and are more robust.
- After restart or restore, active cache warming now automatically warms the page cache to its previous operational state, getting servers back online in record time.
- A new diagnostic utility improves the speed and accuracy of collaboration on support cases.
- Rolling upgrades allow for updating older instances while keeping other members stable and without requiring a restart of the environment.
- Administrators can now implement property security by name, blacklisting properties for users.
Where are the Release Notes?
Release notes for all Neo4j releases can be found here: http://neo4j.com/release-notes/
Is 3.4 an API-Breaking Release?
No. Minor releases are a place to deprecate features and functionality, which includes public APIs. However, we will not remove deprecated functionality until a major release. Note: Upgrading from a version prior to Neo4j 3.0 means that the 3.0 Upgrade FAQs apply, and this would then be a breaking release. If you are upgrading from a 2.x release, see the Upgrade FAQ Archive.
A few things you should know about 3.4:
- The new Slotted Runtime will be used for all Cypher queries in Enterprise Edition. Use the PROFILE or EXPLAIN keywords to see which runtime is being used if unsure.
- While Causal Clustering is the primary clustering architecture we are building on, HA still works as well.
- Causal Clustering is still available for server only, not embedded at this time.
- Configuration settings that changed:
- dbms.allow_format_migration is now dbms.allow_upgrade
Migrate configuration from a pre-3.0 version
When migrating to Neo4j 3.4 from a release prior to 3.0 please note that most configuration settings have been renamed to support a more consistent naming scheme. Also note that neo4j.properties and neo4j-server.properties have been merged into a single neo4j.conf file. Since many settings have been changed between Neo4j 2.x and Neo4j 3.x, it is advisable to use the config-migrator utility to migrate the config files and settings for you. The config-migrator can be found in the bin/tools directory of Neo4j 3.x, and can be invoked with a command like: java -jar config-migrator.jar path/to/neo4j2.3 path/to/neo4j3.3. Take note of any warnings printed, and manually review the edited config files produced. The warnings will alert you to deprecated settings, or settings it did not know about (spelling mistakes, etc) that require manual intervention.
Manually Migrate Native Indexes
Beginning with 3.2, native indexes were introduced to replace Lucene indexes for specific data types for performance gain reasons. 3.3 introduced native indexes for numerics, while 3.4 implemented this feature for strings, spatial, temporal. It is important to note that the current index implementation is not migrated automatically and to benefit from the native indexes, the indexes must be manually dropped and re-created post-upgrade. The choice of index provider is controlled by the setting: dbms.index.default_schema_provider. For more information on native indexes, please refer to here.
Where in the Documentation Can I Learn More about Upgrades?
The Upgrade section of the Neo4j Operations Manual can be found here, and also covers upgrades specific to 3.4. The store upgrade happens by starting your Neo4j data store (after making the backup) with Neo4j 3.4 and the configuration dbms.allow_upgrade=true enabled in the configuration file conf/neo4j.conf
Are there any Backwards-Compatibility Options?
Yes. Cypher lets you specify what version of the Cypher compiler you would like to use. See the Operations Manual for details. So it is possible to run 2.3 queries and newer without changing them. Of course you will eventually want to upgrade your queries to take advantage of the new features in Cypher and Neo4j 3.4. Also of note is the new Causal Clustering architecture introduced in 3.1 and further improved in 3.4. Note that 3.4 will continue to support the previous Master/Slave clustering architecture available in prior versions. You can upgrade an HA system to 3.4, and save the cluster changes for a later date to simplify the process.
Is the Store Upgrade Reversible?
No, once your data store is upgraded, it cannot be rolled back. For this reason, Neo4j makes a backup of each store file as part of the upgrade to 3.4. (And as an extra precaution, it doesn’t hurt to take a second backup before you start the upgrade process. Just make sure you have enough disk space to accommodate this.) Make sure you have at least double the size of your Neo4j store available as free space on your disk, before you upgrade. After the upgrade is successful, those backup files will be removed automatically.
How Long Will the Upgrade Take?
When you initiate the upgrade of your database to 3.4 for the first time, Neo4j will run through the store files and update them to the new format. How much time this takes depends on the size of your data store. We recommend you try this out in a test environment first, to get an idea of the timing, and help you plan your upgrade. Upgrading from 3.x to 3.4 should be quite fast, while upgrading from pre-3.0 to 3.x will take longer due to the Lucene upgrade. Don’t forget though that you will first need to test your application to make sure it works! Chances are that that you may have to make some changes. How much development time required to update your code will depend on your application and which version you are upgrading from. Applications using Neo4j’s native Java APIs will be affected more than others.
When Should I Upgrade?
Upgrading to Neo4j 3.4 from a 3.x version will be very straightforward and will yield immediate performance and governance benefits. You will also have the opportunity to take advantage of new features in the realms of causal clustering, security, governance, etc. If you are in the development and planning phase, then upgrade straight away! If you are already in production with Neo4j, or have a lot of dependencies, test it first and make sure that you have the upgrade steps and dependencies sorted out before upgrading production.
Are Rolling Upgrades Supported?
Yes, but not to 3.4, only 3.4 onward. Rolling upgrades let you upgrade a cluster while it is running. While rolling upgrades between patch releases has unofficially worked in recent versions of Neo4j — Neo4j 3.4 does support rolling upgrades to future versions. This means that you will need to take an outage to upgrade to Neo4j 3.4, but once upgraded, you can rolling upgrade to future versions of Neo4j after that (ex. 3.4.x, 3.5 and onward). However, for Enterprise customers looking for guidance on minimizing the impact of this upgrade on your system, refer to the article Upgrading a Neo4j Cluster with Minimal Downtime
What Version Can I Upgrade From?
Neo4j 3.4 supports direct upgrades from 2.3 and newer. It is generally recommended to upgrade from the most recent patch of your current Neo4j release, as that is the tested upgrade path from pre-3.4 releases to 3.4. Previous versions, such as 2.2, have to be upgraded to 2.3.x first.
How Long Can I Continue Using 3.3?
3.3 will continue to be supported for at least 18 months following its release, until April 23, 2019, per the terms of your Support Agreement. Any fixes deemed applicable to the 3.3 release will be released in a 3.3.x release. As of the time of this writing, the latest stable 3.3.x release is 3.3.5. Commercial customers can view currently Supported Versions here.