Upgrading your node to Corda Community Edition 4.10
Corda releases strive to be backwards compatible, so upgrading a node is fairly straightforward and should not require changes to applications. It consists of the following steps:
- Drain the node
- Make a backup of your node directories and/or database
- Download Corda Community Edition
- Upgrade the node to Corda 4.0 or later
- Replace the corda.jar file with the new version
- Update the configuration
- Start the node with the run-migration-scripts subcommand
- Start the node in the normal way
- Undrain the node
The protocol is designed to tolerate node outages, so during the upgrade process peers on the network will wait for your node to come back.
Step 1: Drain the node
Before a node or application on it can be upgraded, the node must be put in Draining mode. This brings the currently running Flows to a smooth halt such that existing work is finished and new work is queuing up rather than being processed.
Draining flows is a key task for node administrators to perform. It exists to simplify applications by ensuring apps don’t have to be able to migrate workflows from any arbitrary point to other arbitrary points, a task that would rapidly become infeasible as workflow and protocol complexity increases.
To drain the node, run the gracefulShutdown
command. This will wait for the node to drain and then shut down the node when the drain
is complete.
Step 2: Make a backup of your node directories and/or database
It’s always a good idea to make a backup of your data before upgrading any server. This will make it easy to roll back if there’s a problem. You can simply make a copy of the node’s data directory to enable this. If you use an external non-H2 database please consult your database user guide to learn how to make backups.
We provide some backup recommendations if you’d like more detail.
Step 3: Download Corda Community Edition
Download the required version of Corda Community Edition from software.r3.com.
Step 4: Upgrade the node to Corda 4.0 or later
Ensure your node is running Corda 4.0 or later.
Step 5: Replace corda.jar
with the new version
Download the latest version of Corda from Maven. Make sure it’s available on your path, and that you’ve read the Release notes, in particular to discover what version of Java this node requires.
Step 6: Update the configuration
This step is only required when updating from versions less than or equal to 4.5.
Remove any transactionIsolationLevel
, initialiseSchema
, or initialiseAppSchema
entries from the database section of your configuration.
Step 7: Start the node with run-migration-scripts
subcommand
Start the node with the run-migration-scripts
sub-command with --core-schemas
and --app-schemas
.
java -jar corda.jar run-migration-scripts --core-schemas --app-schemas
The node will perform any automatic data migrations required, which may take some time. If the migration process is interrupted it can be continued simply by starting the node again, without harm. The node will stop automatically when migration is complete.
Step 8: Start the node in the normal way
Start the node in the normal way.
Step 9: Undrain the node
Finally, undrain the node to re-enable processing of new inbound flows.
You may now do any checks that you wish to perform, read the logs, and so on. When you are ready, use this command at the shell:
run setFlowsDrainingModeEnabled enabled: false
Your upgrade is complete.
Was this page helpful?
Thanks for your feedback!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.
We're sorry this page wasn't helpful. Let us know how we can make it better!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Create an issue
Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.