Skip to content

Commit 89f1f30

Browse files
SaschaPeukertalexnbAlexicaWright
authored
MRR: test & execute (#643)
Co-authored-by: Alexander Bouriakov <[email protected]> Co-authored-by: Jessica Wright <[email protected]>
1 parent 8bc9d94 commit 89f1f30

File tree

3 files changed

+129
-6
lines changed

3 files changed

+129
-6
lines changed
Loading
Loading

modules/ROOT/pages/auradb/managing-databases/migration-readiness.adoc

Lines changed: 129 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ Earlier versions, such as Neo4j 4 and 5 used semantic versioning (SemVer).
3535
Neo4j Aura uses only the latest version.
3636
====
3737

38+
After implementing the recommendations from the report, you can use the test and live migration functionalities to prepare and, finally, guide you through the actual migration.
39+
3840
=== Control over the time window
3941

42+
[.shadow]
4043
image::mrr-deprecation-query-timeline.png[]
4144

4245
In the "Deprecations and query timeline" section, you will see a chart displaying the usage of deprecated Cypher features and constructs and a general measure of query load on that system (query rate).
@@ -55,6 +58,7 @@ Be aware that while the chart can display up to 7 days, the details for Cypher d
5558

5659
== Cypher deprecations
5760

61+
[.shadow]
5862
image::mrr-fetch-logs.png[width=250]
5963

6064
After selecting a time frame of a maximum of 24 hours, use the button to fetch the deprecations logs in this section.
@@ -70,24 +74,28 @@ You can filter on:
7074

7175
Use the button in the popup to fetch applicable data to populate the report's table.
7276

77+
[.shadow]
7378
image::mrr-deprecation-table.png[]
7479

7580
Each row in the table represents a query in the selected timeframe that must be changed to seamlessly migrate to the latest Aura version.
76-
You have to rewrite those queries to only use Cypher supported by the latest version.
81+
You have to rewrite those queries to only use Cypher supported by the latest Aura version.
7782

7883
All executions of the same query are aggregated into one row (see also the "Count" column).
7984
Use the magnifying glass at the start of each row to access a popup with more information about the query and suggestions on dealing with each issue.
8085
It also provides relevant links to the documentation for each deprecation.
8186

87+
[.shadow]
8288
image::mrr-resolution-guide.png[width=600]
8389

8490
The last column in the table of Cypher deprecations links to a view of this specific query in the Aura Query Log Analyzer tool, which can provide information on each execution of the selected query.
8591
The tool can view queries on all databases except the `system` database.
8692

93+
[.shadow]
8794
image::mrr-show-query-log-button.png[width=400]
8895

8996
== Deprecated driver usage
9097

98+
[.shadow]
9199
image::mrr-fetch-driver-stats.png[width=400]
92100

93101
After selecting a time frame of a maximum of 24 hours, use the button to fetch the driver statistics in this section.
@@ -97,20 +105,135 @@ You can change those freely to see all driver usage, for example.
97105
Use the button in the popup to fetch applicable data to populate the report's table.
98106
Depending on the type of client accessing the Neo4j database, links are provided in the column “Latest version” to help with the upgrade.
99107

108+
[.shadow]
100109
image::mrr-driver-table.png[]
101110

102111
Like the Cypher deprecations table, the last column links to a view of this specific driver's executed queries in the Aura Query Log tool.
103112
The tool can provide information on each query execution in which the selected driver was used.
104113
The tool can view queries on all databases except the `system` database.
105114

106-
=== Deprecated index types
115+
== Deprecated index types
107116

108117
This section provides information on how to deal with deprecated indexes that may be used in version 4 but need to be handled before or while moving to the latest version.
109118

110-
This part involves manually running a provided Cypher query on your database to identify the deprecated indexes and then deciding how to best deal with them.
119+
This part involves manually running a provided Cypher query on your database to identify the deprecated indexes or constraints backed by deprecated indexes and then deciding how to best deal with them.
120+
For each deprecated index you can decide to manually create a replacement index before the migration (pre-create) or have the migration process create it for you.
121+
Pre-creating indexes will speed up the migration process but requires additional disk space.
122+
Not pre-creating indexes will lead to a longer migration process and may result in the need to manually recreate indexes after the migration, as the automatically migrated indexes may not be the optimal type for your application.
123+
111124
Further enhancements to this feature will be provided in the future.
112125

113-
=== Next steps
126+
== Testing and executing the migration
127+
128+
After implementing the recommendations from the report, you can now test and run the migration.
129+
Only users with the permission to create and delete instances can access this functionality.
130+
It is highly recommended to run a test migration before attempting the live migration.
131+
132+
It is also advisable to set up a custom endpoint before the migration to speed up the switch to the migrated instance in your application.
133+
For more information, see xref:auradb/managing-databases/custom-endpoints.adoc[Custom endpoints].
134+
135+
At this time, neither the test nor the live migration will include changes to the store format like moving to block format.
136+
137+
[NOTE]
138+
====
139+
During the migration, the migration target instance may be shown with a few different statuses on the instance page, such as LOADING or OVERWRITING for example.
140+
Do not attempt to access the instance before the migration is safely finished.
141+
The progress of migration can be seen in the Migration Readiness Report of the original instance.
142+
====
143+
144+
=== Run a test migration
145+
146+
Use the *Run test migration* buttons at the top or bottom of the page and then follow the steps outlined in the dialog boxes.
147+
148+
The steps of running a test migration are:
149+
150+
. Carefully read and act upon the steps described in the "Read before test migration" dialog.
151+
Proceed only if you made the appropriate preparations (e.g. backups of your configurations).
152+
. Configure a target instance, as described in the next section.
153+
.. If you have selected a new instance to migrate to: Download the new credentials for that instance.
154+
. Wait for the migration to finish.
155+
. Follow all steps outlined in "Next steps before finalizing the test migration" at the top of the Migration Readiness Report page.
156+
This includes all your testing on the migrated instance.
157+
. Once you are done with testing, click the "Finalize test migration" button and complete the dialog to remove your test instance.
158+
159+
You can repeat test migrations or run them in parallel as much as need.
160+
Be aware that running those instances incur the same cost as running any other instance of that size.
161+
162+
==== Configure target instance
163+
164+
An instance can either be migrated to a new instance or an instance that is already running the latest version of Aura and that fits the memory and storage configuration of the original instance.
165+
This means that if you select the second option, the instance you want to migrate to has to have at least the same amount of memory and storage as the original one.
166+
167+
Note that cloning into an existing instance overwrites all of its existing data and name.
168+
This action cannot be undone and may take longer than cloning to a new instance.
169+
If you still have data that you want to keep on the instance, it is advised to take a snapshot and download it before continuing.
170+
171+
[NOTE]
172+
====
173+
In the process of migrating to a test instance, the instance will get a new name, regardless if it is new or existing.
174+
It starts with "[Testing]", followed by (most of) the original instance's name and a test counter in parentheses e.g. "[Testing] original name (1)".
175+
====
176+
177+
==== Testing the migrated instance
178+
179+
Once you see the box below on the Migration Readiness Report, your migrated instance is ready for testing.
180+
Follow the steps described and test your instance to make sure your live migration will go smoothly.
181+
182+
[.shadow]
183+
image::mrr-test-instance-ready.png[]
184+
185+
==== Finalize test migration
186+
187+
Once you are done with testing, use the "Finalize test migration" button.
188+
You will be asked to acknowledge the finalization since the *test instance is deleted* in the process.
189+
You can skip this step and keep the test instance, but this incurs a cost.
190+
Therefore, to minimize costs if you test manually, don't forget to delete the test instance when you are done.
191+
192+
=== Run the live migration
193+
194+
Use the *Live migration* buttons at the top or bottom of the page and then follow the steps outlined in the dialog boxes.
195+
196+
The steps of running the live migration are:
197+
198+
. Carefully read and act upon the steps described in the "Read before live migration" dialog.
199+
Proceed only if you made the appropriate preparations (e.g. backups of your configurations).
200+
. Carefully read and act upon the step described in the "Writes made on the v4 instance during migration" dialog.
201+
Make sure that your application will not write to the original instance during the migration to prevent this data from being lost.
202+
. Configure a target instance, as described in the next section.
203+
.. If you have selected a new instance to migrate to: Download the new credentials for that instance.
204+
. Wait for the migration to finish.
205+
. Follow all steps outlined in "Next steps before finalizing the live migration" at the top of the Migration Readiness Report page.
206+
This includes all your testing on the migrated instance.
207+
. Once you are done with testing, click the "Finalize live migration" button and complete the dialog to remove your original version 4 instance.
208+
209+
There can only be one live migration in progress at any time.
210+
If you need to, you can restart the process at any point by removing the migrated instance until you finalize the migration by removing the original instance.
211+
212+
==== Configure target instance
213+
214+
An instance can either be migrated to a new instance or an instance that is already running the latest version of Aura and that fits the memory and storage configuration of the original instance.
215+
This means that if you select the second option, the instance you want to migrate to has to have at least the same amount of memory and storage as the original one.
216+
217+
Note that cloning into an existing instance overwrites all of its existing data and name.
218+
This action cannot be undone and may take longer than cloning to a new instance.
219+
If you still have data that you want to keep on the instance, it is advised to take a snapshot and download it before continuing.
220+
221+
Regardless of which option you select, the name of the migration target instance will be the same as the original instance.
222+
223+
==== Testing the migrated instance
224+
225+
Once you see the following box on the Migration Readiness Report your migrated instance is ready for testing.
226+
Follow the steps described and test your instance to make sure your application can work with it in your production system.
227+
228+
[.shadow]
229+
image::mrr-live-migration-ready-for-test.png[]
230+
231+
==== Finalize live migration
232+
233+
Once you are done with testing, use the "Finalize live migration" button.
234+
You will be asked to acknowledge the finalization since *the original instance is permanently removed* in the process.
235+
Additionally, when the dialog is completed, you will no longer have access to the Migration readiness report.
114236

115-
After implementing all the recommended fixes from the report, you can now test the migration.
116-
Use the "Test migration" button at the bottom of the page and then follow the steps outlined in the docs.
237+
You can also postpone this step and keep the original instance e.g. as a rollback option.
238+
Be mindful that this means you have the running costs for both the migrated and the original instance.
239+
If you wish to remove the original instance later, you can revisit this step or remove it via the Aura console.

0 commit comments

Comments
 (0)